diff options
| author | MohamedBassem <me@mbassem.com> | 2024-02-29 22:49:15 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-02-29 22:49:15 +0000 |
| commit | 2ca29af4226fe07c46c2d2349f4ee9407711f1a3 (patch) | |
| tree | 3e6dbc58c9c7c93c1352ddfc41116496e870e4b8 | |
| parent | 8c2c8c1e0370ba20f94e766bef334c39db9cf433 (diff) | |
| download | karakeep-2ca29af4226fe07c46c2d2349f4ee9407711f1a3.tar.zst | |
fix: Fix API key authorization
| -rw-r--r-- | packages/db/schema.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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], + }), + }), +); |
