Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix: Fix API key authorization

MohamedBassem2ca29af4226f
diff --git a/packages/db/schema.ts b/packages/db/schema.ts
index 4acd86c4..8d08282e 100644
--- a/packages/db/schema.ts
+++ b/packages/db/schema.ts
@@ -219,3 +219,13 @@ export const tagsOnBookmarksRelations = relations(
}),
}),
);
+
+export const apiKeyRelations = relations(
+ apiKeys,
+ ({ one }) => ({
+ user: one(users, {
+ fields: [apiKeys.userId],
+ references: [users.id],
+ }),
+ }),
+);