Skip to content

Commit

Permalink
update: ensured empty string app_url are saved
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi-bams committed Apr 10, 2024
1 parent 3843f44 commit 63d82c8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions dist/src/controllers/chatTribes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/chatTribes.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/src/utils/tribes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/utils/tribes.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/controllers/chatTribes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tribes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
})
Expand Down

0 comments on commit 63d82c8

Please sign in to comment.