mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-13 12:33:24 +02:00
update: ensured empty string app_url are saved
This commit is contained in:
parent
3843f44199
commit
63d82c88c3
6 changed files with 11 additions and 10 deletions
6
dist/src/controllers/chatTribes.js
vendored
6
dist/src/controllers/chatTribes.js
vendored
|
|
@ -449,9 +449,9 @@ function editTribe(req, res) {
|
|||
obj.escrowMillis = escrow_millis;
|
||||
if (unlisted || unlisted === false)
|
||||
obj.unlisted = unlisted;
|
||||
if (app_url)
|
||||
if (app_url || app_url === '')
|
||||
obj.appUrl = app_url;
|
||||
if (feed_url)
|
||||
if (feed_url || feed_url === '')
|
||||
obj.feedUrl = feed_url;
|
||||
if (feed_type)
|
||||
obj.feedType = feed_type;
|
||||
|
|
@ -469,7 +469,7 @@ function editTribe(req, res) {
|
|||
obj.stakworkApiKey = stakwork_api_key;
|
||||
if (stakwork_webhook)
|
||||
obj.stakworkWebhook = stakwork_webhook;
|
||||
if (second_brain_url)
|
||||
if (second_brain_url || 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
2
dist/src/utils/tribes.js
vendored
2
dist/src/utils/tribes.js
vendored
|
|
@ -436,7 +436,7 @@ function edit({ uuid, host, name, description, tags, img, price_per_message, pri
|
|||
owner_route_hint: owner_route_hint || '',
|
||||
pin: pin || '',
|
||||
profile_filters,
|
||||
second_brain_url,
|
||||
second_brain_url: second_brain_url || '',
|
||||
}),
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
});
|
||||
|
|
|
|||
2
dist/src/utils/tribes.js.map
vendored
2
dist/src/utils/tribes.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -491,8 +491,8 @@ export async function editTribe(req: Req, res: Res): Promise<void | Response> {
|
|||
if (escrow_amount || escrow_amount === 0) obj.escrowAmount = escrow_amount
|
||||
if (escrow_millis || escrow_millis === 0) obj.escrowMillis = escrow_millis
|
||||
if (unlisted || unlisted === false) obj.unlisted = unlisted
|
||||
if (app_url) obj.appUrl = app_url
|
||||
if (feed_url) obj.feedUrl = feed_url
|
||||
if (app_url || app_url === '') obj.appUrl = app_url
|
||||
if (feed_url || feed_url === '') obj.feedUrl = feed_url
|
||||
if (feed_type) obj.feedType = feed_type
|
||||
if (req.body.private || req.body.private === false)
|
||||
obj.private = req.body.private
|
||||
|
|
@ -503,7 +503,8 @@ 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 (second_brain_url || second_brain_url === '')
|
||||
obj.secondBrainUrl = second_brain_url
|
||||
if (Object.keys(obj).length > 0) {
|
||||
await chat.update(obj)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ export async function edit({
|
|||
owner_route_hint: owner_route_hint || '',
|
||||
pin: pin || '',
|
||||
profile_filters,
|
||||
second_brain_url,
|
||||
second_brain_url: second_brain_url || '',
|
||||
}),
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue