diff options
| author | kamtschatka <simon.schatka@gmx.at> | 2024-07-01 21:32:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 20:32:54 +0100 |
| commit | 4e70fe34742a5b4f505e61fcd236574dc5c3e265 (patch) | |
| tree | bd456636c5838bacb4983d5c65f017ee02ca0233 /packages/trpc | |
| parent | 9cd617055b7878048120eebd58dc2e05a9cbdfca (diff) | |
| download | karakeep-4e70fe34742a5b4f505e61fcd236574dc5c3e265.tar.zst | |
refactor: fixed typos in BookmarkTypes (#268)
Diffstat (limited to 'packages/trpc')
| -rw-r--r-- | packages/trpc/routers/bookmarks.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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( |
