aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2024-10-20 15:54:34 +0000
committerMohamed Bassem <me@mbassem.com>2024-10-20 15:54:34 +0000
commite89a38680532c3ab72ef26dfe88bb64476b709ab (patch)
tree2ec336dc4bd8cd18043739bd603677d60ad70da1 /packages/trpc/routers
parent20e5225e0547978cab656e94a3519cd590a16d8a (diff)
downloadkarakeep-e89a38680532c3ab72ef26dfe88bb64476b709ab.tar.zst
feature(api): Add REST APIs to update bookmarks, tags and lists
Diffstat (limited to 'packages/trpc/routers')
-rw-r--r--packages/trpc/routers/tags.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/trpc/routers/tags.ts b/packages/trpc/routers/tags.ts
index a5d93213..c04593c9 100644
--- a/packages/trpc/routers/tags.ts
+++ b/packages/trpc/routers/tags.ts
@@ -6,7 +6,10 @@ import type { ZAttachedByEnum } from "@hoarder/shared/types/tags";
import { SqliteError } from "@hoarder/db";
import { bookmarkTags, tagsOnBookmarks } from "@hoarder/db/schema";
import { triggerSearchReindex } from "@hoarder/shared/queues";
-import { zGetTagResponseSchema } from "@hoarder/shared/types/tags";
+import {
+ zGetTagResponseSchema,
+ zUpdateTagRequestSchema,
+} from "@hoarder/shared/types/tags";
import type { Context } from "../index";
import { authedProcedure, router } from "../index";
@@ -150,12 +153,7 @@ export const tagsAppRouter = router({
return { deletedTags: res.changes };
}),
update: authedProcedure
- .input(
- z.object({
- tagId: z.string(),
- name: z.string().optional(),
- }),
- )
+ .input(zUpdateTagRequestSchema)
.output(
z.object({
id: z.string(),