diff options
| author | Fuwn <[email protected]> | 2026-03-27 09:30:36 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-27 09:30:36 +0000 |
| commit | 7653144fe7b185260c5a1b647cf1b83e78069177 (patch) | |
| tree | bdc4c33ebbd5bce99c87f9c74e50f602662d9772 /src/lib/Database/SB/User | |
| parent | chore(pnpm): Update lockfile (diff) | |
| download | due.moe-7653144fe7b185260c5a1b647cf1b83e78069177.tar.xz due.moe-7653144fe7b185260c5a1b647cf1b83e78069177.zip | |
refactor(supabase): move app access to service role
Diffstat (limited to 'src/lib/Database/SB/User')
| -rw-r--r-- | src/lib/Database/SB/User/badges.ts | 4 | ||||
| -rw-r--r-- | src/lib/Database/SB/User/configuration.ts | 2 | ||||
| -rw-r--r-- | src/lib/Database/SB/User/notifications.ts | 2 | ||||
| -rw-r--r-- | src/lib/Database/SB/User/preferences.ts | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Database/SB/User/badges.ts b/src/lib/Database/SB/User/badges.ts index 5d7d4899..026ca98f 100644 --- a/src/lib/Database/SB/User/badges.ts +++ b/src/lib/Database/SB/User/badges.ts @@ -1,5 +1,5 @@ import { databaseTimeToDate } from "$lib/Utility/time"; -import sb from "../../sb"; +import sb from "../../sb.server"; export interface Badge { id: number; @@ -87,7 +87,7 @@ export const addUserBadge = async (userId: number, badge: BadgeInput) => { }; export const removeUserBadge = async (userId: number, id: number) => { - if (!isNaN(id)) + if (!Number.isNaN(id)) await sb.from("user_badges").delete().eq("id", id).eq("user_id", userId); }; diff --git a/src/lib/Database/SB/User/configuration.ts b/src/lib/Database/SB/User/configuration.ts index 6007e41b..09c74c6c 100644 --- a/src/lib/Database/SB/User/configuration.ts +++ b/src/lib/Database/SB/User/configuration.ts @@ -1,4 +1,4 @@ -import sb from "../../sb"; +import sb from "../../sb.server"; interface UserConfiguration { user_id: number; diff --git a/src/lib/Database/SB/User/notifications.ts b/src/lib/Database/SB/User/notifications.ts index 75dd5941..058171a9 100644 --- a/src/lib/Database/SB/User/notifications.ts +++ b/src/lib/Database/SB/User/notifications.ts @@ -1,4 +1,4 @@ -import sb from "../../sb"; +import sb from "../../sb.server"; export interface UserNotifications { created_at: string; diff --git a/src/lib/Database/SB/User/preferences.ts b/src/lib/Database/SB/User/preferences.ts index f0a49397..fcffbff2 100644 --- a/src/lib/Database/SB/User/preferences.ts +++ b/src/lib/Database/SB/User/preferences.ts @@ -1,4 +1,4 @@ -import sb from "../../sb"; +import sb from "../../sb.server"; export interface UserPreferences { created_at: string; |