aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/routers/bookmarks.ts
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-04-18 10:01:45 +0100
committerMohamedBassem <me@mbassem.com>2024-04-18 10:01:45 +0100
commitdeba31ee010f785a9739fd4df8a64a3056c9593d (patch)
tree647499476af517b045a784591e0f8538551f69a4 /packages/trpc/routers/bookmarks.ts
parent81fc4c45269fcd2b9cb9b6a001f8208f6b2b04a3 (diff)
downloadkarakeep-deba31ee010f785a9739fd4df8a64a3056c9593d.tar.zst
refactor: Move the shared types to the shared package
Diffstat (limited to 'packages/trpc/routers/bookmarks.ts')
-rw-r--r--packages/trpc/routers/bookmarks.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts
index a447235b..0383d3f2 100644
--- a/packages/trpc/routers/bookmarks.ts
+++ b/packages/trpc/routers/bookmarks.ts
@@ -3,6 +3,11 @@ import { and, desc, eq, exists, inArray, lte, or } from "drizzle-orm";
import invariant from "tiny-invariant";
import { z } from "zod";
+import type {
+ ZBookmark,
+ ZBookmarkContent,
+} from "@hoarder/shared/types/bookmarks";
+import type { ZBookmarkTags } from "@hoarder/shared/types/tags";
import { db as DONT_USE_db } from "@hoarder/db";
import {
bookmarkAssets,
@@ -20,11 +25,6 @@ import {
SearchIndexingQueue,
} from "@hoarder/shared/queues";
import { getSearchIdxClient } from "@hoarder/shared/search";
-
-import type { Context } from "../index";
-import type { ZBookmark, ZBookmarkContent } from "../types/bookmarks";
-import type { ZBookmarkTags } from "../types/tags";
-import { authedProcedure, router } from "../index";
import {
DEFAULT_NUM_BOOKMARKS_PER_PAGE,
zBareBookmarkSchema,
@@ -33,7 +33,10 @@ import {
zGetBookmarksResponseSchema,
zNewBookmarkRequestSchema,
zUpdateBookmarksRequestSchema,
-} from "../types/bookmarks";
+} from "@hoarder/shared/types/bookmarks";
+
+import type { Context } from "../index";
+import { authedProcedure, router } from "../index";
export const ensureBookmarkOwnership = experimental_trpcMiddleware<{
ctx: Context;