diff options
| author | Fuwn <[email protected]> | 2024-02-17 01:32:59 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-17 01:32:59 -0800 |
| commit | ae14e8263a9d42c539b748c9781d3c249f94af59 (patch) | |
| tree | e04754cc3815203aa5bdaef804d697e0b103a917 /src/lib/Database | |
| parent | fix(hololive): wait for pinned streams (diff) | |
| download | due.moe-ae14e8263a9d42c539b748c9781d3c249f94af59.tar.xz due.moe-ae14e8263a9d42c539b748c9781d3c249f94af59.zip | |
feat(settings): delete remote configuration
Diffstat (limited to 'src/lib/Database')
| -rw-r--r-- | src/lib/Database/userConfiguration.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Database/userConfiguration.ts b/src/lib/Database/userConfiguration.ts index f1e3ef95..de86fbe4 100644 --- a/src/lib/Database/userConfiguration.ts +++ b/src/lib/Database/userConfiguration.ts @@ -64,3 +64,11 @@ export const toggleHololiveStreamPinning = async (userId: number, streamId: stri pinned_hololive_streams: pinnedStreams }); }; + +export const deleteUserConfiguration = async (userId: number) => { + const { data, error } = await supabase.from('user_configuration').delete().eq('user_id', userId); + + if (error || !data) return null; + + return data; +}; |