aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers
diff options
context:
space:
mode:
Diffstat (limited to 'packages/trpc/routers')
-rw-r--r--packages/trpc/routers/bookmarks.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts
index db9d33fc..31ffef4a 100644
--- a/packages/trpc/routers/bookmarks.ts
+++ b/packages/trpc/routers/bookmarks.ts
@@ -240,10 +240,14 @@ async function toZodSchema(
}
return {
- tags: tagsOnBookmarks.map((t) => ({
- attachedBy: t.attachedBy,
- ...t.tag,
- })),
+ tags: tagsOnBookmarks
+ .map((t) => ({
+ attachedBy: t.attachedBy,
+ ...t.tag,
+ }))
+ .sort((a, b) =>
+ a.attachedBy === "ai" ? 1 : b.attachedBy === "ai" ? -1 : 0,
+ ),
content,
assets: assets.map((a) => ({
id: a.id,