mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-13 12:33:24 +02:00
update: added second brain url to update tribe
This commit is contained in:
parent
5a7b191db1
commit
5b271982a0
3 changed files with 6 additions and 2 deletions
4
dist/src/controllers/chatTribes.js
vendored
4
dist/src/controllers/chatTribes.js
vendored
|
|
@ -371,7 +371,7 @@ function editTribe(req, res) {
|
|||
if (!req.owner)
|
||||
return (0, res_1.failure)(res, 'no owner');
|
||||
const tenant = req.owner.id;
|
||||
const { name, price_per_message, price_to_join, escrow_amount, escrow_millis, img, description, tags, unlisted, app_url, feed_url, feed_type, pin, call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook, } = req.body;
|
||||
const { name, price_per_message, price_to_join, escrow_amount, escrow_millis, img, description, tags, unlisted, app_url, feed_url, feed_type, pin, call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook, second_brain_url, } = req.body;
|
||||
const { id } = req.params;
|
||||
if (!id)
|
||||
return (0, res_1.failure)(res, 'group id is required');
|
||||
|
|
@ -468,6 +468,8 @@ function editTribe(req, res) {
|
|||
obj.stakworkApiKey = stakwork_api_key;
|
||||
if (stakwork_webhook)
|
||||
obj.stakworkWebhook = stakwork_webhook;
|
||||
if (second_brain_url)
|
||||
obj.secondBrainUrl = second_brain_url;
|
||||
if (Object.keys(obj).length > 0) {
|
||||
yield chat.update(obj);
|
||||
}
|
||||
|
|
|
|||
2
dist/src/controllers/chatTribes.js.map
vendored
2
dist/src/controllers/chatTribes.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -417,6 +417,7 @@ export async function editTribe(req: Req, res: Res): Promise<void | Response> {
|
|||
jitsi_server,
|
||||
stakwork_api_key,
|
||||
stakwork_webhook,
|
||||
second_brain_url,
|
||||
} = req.body
|
||||
const { id } = req.params
|
||||
|
||||
|
|
@ -501,6 +502,7 @@ export async function editTribe(req: Req, res: Res): Promise<void | Response> {
|
|||
if (jitsi_server) obj.jitsiServer = jitsi_server
|
||||
if (stakwork_api_key) obj.stakworkApiKey = stakwork_api_key
|
||||
if (stakwork_webhook) obj.stakworkWebhook = stakwork_webhook
|
||||
if (second_brain_url) obj.secondBrainUrl = second_brain_url
|
||||
if (Object.keys(obj).length > 0) {
|
||||
await chat.update(obj)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue