aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/trpc')
-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(),