From 4e70fe34742a5b4f505e61fcd236574dc5c3e265 Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Mon, 1 Jul 2024 21:32:54 +0200 Subject: refactor: fixed typos in BookmarkTypes (#268) --- packages/trpc/routers/bookmarks.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/trpc') diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts index d0ffc7d3..1e5e7dfc 100644 --- a/packages/trpc/routers/bookmarks.ts +++ b/packages/trpc/routers/bookmarks.ts @@ -178,7 +178,7 @@ function toZodSchema(bookmark: BookmarkQueryReturnType): ZBookmark { const { tagsOnBookmarks, link, text, asset, assets, ...rest } = bookmark; let content: ZBookmarkContent = { - type: BookmarkTypes.UNKNWON, + type: BookmarkTypes.UNKNOWN, }; switch (bookmark.type) { case BookmarkTypes.LINK: @@ -230,7 +230,7 @@ export const bookmarksAppRouter = router({ return { ...alreadyExists, alreadyExists: true }; } } - if (input.type == BookmarkTypes.UNKNWON) { + if (input.type == BookmarkTypes.UNKNOWN) { throw new TRPCError({ code: "BAD_REQUEST" }); } const bookmark = await ctx.db.transaction(async (tx) => { @@ -603,7 +603,7 @@ export const bookmarksAppRouter = router({ if ( row.bookmarkTags && - // Duplicates may accur because of the join, so we need to make sure we're not adding the same tag twice + // Duplicates may occur because of the join, so we need to make sure we're not adding the same tag twice !acc[bookmarkId].tags.some((t) => t.id == row.bookmarkTags!.id) ) { invariant( -- cgit v1.2.3-70-g09d2