mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-05-07 20:59:37 -05:00
[server][core] do not add redundant bookmarks
This commit is contained in:
@@ -42,7 +42,7 @@ WHERE username = $2;
|
||||
-- name: AddBookmark :exec
|
||||
UPDATE users
|
||||
SET
|
||||
bookmarks = bookmarks || to_jsonb(array[@id::uuid]),
|
||||
bookmarks = CASE WHEN bookmarks ? (@id::uuid)::text THEN bookmarks ELSE bookmarks || to_jsonb(array[@id::uuid]) END,
|
||||
modified = NOW()
|
||||
WHERE username = @username::text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user