diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-12-22 14:04:53 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-12-22 14:04:53 +0000 |
| commit | ca4bfa4c88287aba23c104a93e4fb6be7b2776da (patch) | |
| tree | fa15813651d6e96a565464acb71f2c5a40a8d526 /packages/shared-server/src | |
| parent | e18dc4c93eedc925bed6cc0754b200c58bcdf7f8 (diff) | |
| download | karakeep-ca4bfa4c88287aba23c104a93e4fb6be7b2776da.tar.zst | |
fix: check quota usage instead bookmark transaction
Diffstat (limited to 'packages/shared-server/src')
| -rw-r--r-- | packages/shared-server/src/services/quotaService.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/shared-server/src/services/quotaService.ts b/packages/shared-server/src/services/quotaService.ts index a09b76bf..bedda881 100644 --- a/packages/shared-server/src/services/quotaService.ts +++ b/packages/shared-server/src/services/quotaService.ts @@ -22,7 +22,10 @@ export class StorageQuotaError extends Error { export class QuotaService { // TODO: Use quota approval tokens for bookmark creation when // bookmark creation logic is in the model. - static async canCreateBookmark(db: DB, userId: string) { + static async canCreateBookmark( + db: DB | KarakeepDBTransaction, + userId: string, + ) { const user = await db.query.users.findFirst({ where: eq(users.id, userId), columns: { |
