diff options
| author | Fuwn <[email protected]> | 2024-08-24 02:38:40 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-08-24 02:42:01 -0700 |
| commit | 32c7545faae4f33c94a045408789c9b9ef7de53a (patch) | |
| tree | 3ce6632bd710b4453749f0e71186027683415843 | |
| parent | feat(SequelCatcher): side stories toggle (diff) | |
| download | due.moe-32c7545faae4f33c94a045408789c9b9ef7de53a.tar.xz due.moe-32c7545faae4f33c94a045408789c9b9ef7de53a.zip | |
refactor(Data): rename database references
39 files changed, 73 insertions, 79 deletions
diff --git a/src/lib/Data/AniList/activity.ts b/src/lib/Data/AniList/activity.ts index b1f43b7d..c50ffa62 100644 --- a/src/lib/Data/AniList/activity.ts +++ b/src/lib/Data/AniList/activity.ts @@ -1,4 +1,4 @@ -import { database } from '$lib/Database/IndexedDB/activities'; +import { database } from '$lib/Database/IDB/activities'; import type { User } from './follow'; import type { AniListAuthorisation, UserIdentity } from './identity'; diff --git a/src/lib/Database/IndexedDB/activities.ts b/src/lib/Database/IDB/activities.ts index 6a505ff3..6a505ff3 100644 --- a/src/lib/Database/IndexedDB/activities.ts +++ b/src/lib/Database/IDB/activities.ts diff --git a/src/lib/Database/IndexedDB/chapters.ts b/src/lib/Database/IDB/chapters.ts index 0f77f0a0..0f77f0a0 100644 --- a/src/lib/Database/IndexedDB/chapters.ts +++ b/src/lib/Database/IDB/chapters.ts diff --git a/src/lib/Database/IndexedDB/user.ts b/src/lib/Database/IDB/user.ts index e7285a07..e7285a07 100644 --- a/src/lib/Database/IndexedDB/user.ts +++ b/src/lib/Database/IDB/user.ts diff --git a/src/lib/Database/Supabase/User/badges.ts b/src/lib/Database/SB/User/badges.ts index 25fae9b7..14f848c5 100644 --- a/src/lib/Database/Supabase/User/badges.ts +++ b/src/lib/Database/SB/User/badges.ts @@ -1,5 +1,5 @@ import { databaseTimeToDate } from '$lib/Utility/time'; -import supabase from '../../supabase'; +import sb from '../../sb'; export interface Badge { post?: string; @@ -16,7 +16,7 @@ export interface Badge { } export const getUserBadges = async (userId: number): Promise<Badge[]> => { - const { data, error } = await supabase.from('user_badges').select('*').eq('user_id', userId); + const { data, error } = await sb.from('user_badges').select('*').eq('user_id', userId); if (error) return []; @@ -34,7 +34,7 @@ export const addUserBadge = async (userId: number, badge: Badge) => { if (post === undefined || image === undefined) return; if (time) { - await supabase.from('user_badges').insert({ + await sb.from('user_badges').insert({ user_id: userId, post, image, @@ -46,20 +46,20 @@ export const addUserBadge = async (userId: number, badge: Badge) => { designer }); } else { - await supabase + await sb .from('user_badges') .insert({ user_id: userId, post, image, description, category, hidden, source, designer }); } }; export const removeUserBadge = async (userId: number, id: number) => { - if (!isNaN(id)) await supabase.from('user_badges').delete().eq('id', id).eq('user_id', userId); + if (!isNaN(id)) await sb.from('user_badges').delete().eq('id', id).eq('user_id', userId); }; export const updateUserBadge = async (userId: number, id: number, badge: Badge) => { if (badge.post === undefined || badge.image === undefined) return; - await supabase + await sb .from('user_badges') .update({ post: badge.post, @@ -76,31 +76,31 @@ export const updateUserBadge = async (userId: number, id: number, badge: Badge) }; export const renameCategory = async (userId: number, oldName: string, newName: string) => - await supabase + await sb .from('user_badges') .update({ category: newName }) .eq('category', oldName) .eq('user_id', userId); export const removeAllUserBadges = async (userId: number) => - await supabase.from('user_badges').delete().eq('user_id', userId); + await sb.from('user_badges').delete().eq('user_id', userId); export const migrateCategory = async (userId: number, oldName: string, newName: string) => - await supabase + await sb .from('user_badges') .update({ category: newName }) .eq('category', oldName) .eq('user_id', userId); export const setShadowHidden = async (userId: number, shadowHide: boolean) => - await supabase.from('user_badges').update({ shadow_hidden: shadowHide }).eq('user_id', userId); + await sb.from('user_badges').update({ shadow_hidden: shadowHide }).eq('user_id', userId); export const setShadowHiddenBadge = async (userId: number, id: number, shadowHide: boolean) => - await supabase + await sb .from('user_badges') .update({ shadow_hidden: shadowHide }) .eq('id', id) .eq('user_id', userId); export const incrementClickCount = async (id: number) => - await supabase.rpc('user_badges_increment_click_count', { user_badge_id: id }); + await sb.rpc('user_badges_increment_click_count', { user_badge_id: id }); diff --git a/src/lib/Database/Supabase/User/configuration.ts b/src/lib/Database/SB/User/configuration.ts index 36da1963..b889e95c 100644 --- a/src/lib/Database/Supabase/User/configuration.ts +++ b/src/lib/Database/SB/User/configuration.ts @@ -1,4 +1,4 @@ -import supabase from '../../supabase'; +import sb from '../../sb'; interface UserConfiguration { user_id: number; @@ -13,10 +13,7 @@ interface NewUserConfiguration { } export const getUserConfiguration = async (userId: number) => { - const { data, error } = await supabase - .from('user_configuration') - .select('*') - .eq('user_id', userId); + const { data, error } = await sb.from('user_configuration').select('*').eq('user_id', userId); if (error || data.length === 0 || data[0].user_id !== userId) return null; @@ -24,7 +21,7 @@ export const getUserConfiguration = async (userId: number) => { }; export const setUserConfiguration = async (userId: number, configuration: NewUserConfiguration) => { - const { data, error } = await supabase + const { data, error } = await sb .from('user_configuration') .upsert( { @@ -42,7 +39,7 @@ export const setUserConfiguration = async (userId: number, configuration: NewUse }; export const deleteUserConfiguration = async (userId: number) => { - const { data, error } = await supabase.from('user_configuration').delete().eq('user_id', userId); + const { data, error } = await sb.from('user_configuration').delete().eq('user_id', userId); if (error || !data) return null; diff --git a/src/lib/Database/Supabase/User/notifications.ts b/src/lib/Database/SB/User/notifications.ts index d8cd75ee..b07a0a3a 100644 --- a/src/lib/Database/Supabase/User/notifications.ts +++ b/src/lib/Database/SB/User/notifications.ts @@ -1,4 +1,4 @@ -import supabase from '../../supabase'; +import sb from '../../sb'; export interface UserNotifications { created_at: string; @@ -8,10 +8,10 @@ export interface UserNotifications { } export const getUserSubscription = async (userId: number) => - await supabase.from('user_notifications').select('*').eq('user_id', userId); + await sb.from('user_notifications').select('*').eq('user_id', userId); export const getUserSubscriptions = async () => { - const { data, error } = await supabase.from('user_notifications').select('*'); + const { data, error } = await sb.from('user_notifications').select('*'); if (error) return []; @@ -19,10 +19,10 @@ export const getUserSubscriptions = async () => { }; export const deleteUserSubscription = async (userId: number) => - await supabase.from('user_notifications').delete().eq('user_id', userId); + await sb.from('user_notifications').delete().eq('user_id', userId); export const setUserSubscription = async (userId: number, subscription: JSON) => - await supabase.from('user_notifications').upsert( + await sb.from('user_notifications').upsert( { user_id: userId, updated_at: new Date().toISOString(), diff --git a/src/lib/Database/Supabase/User/preferences.ts b/src/lib/Database/SB/User/preferences.ts index 0eaebef7..e08d1e48 100644 --- a/src/lib/Database/Supabase/User/preferences.ts +++ b/src/lib/Database/SB/User/preferences.ts @@ -1,4 +1,4 @@ -import supabase from '../../supabase'; +import sb from '../../sb'; export interface UserPreferences { created_at: string; @@ -23,7 +23,7 @@ interface NewUserPreferences { } export const getUserPreferences = async (userId: number) => { - const { data, error } = await supabase.from('user_preferences').select('*').eq('user_id', userId); + const { data, error } = await sb.from('user_preferences').select('*').eq('user_id', userId); if (error || data.length === 0 || data[0].user_id !== userId) return null; @@ -32,7 +32,7 @@ export const getUserPreferences = async (userId: number) => { export const setUserPreferences = async (userId: number, preferences: NewUserPreferences) => { const userPreferences = await getUserPreferences(userId); - const { data, error } = await supabase + const { data, error } = await sb .from('user_preferences') .upsert( { diff --git a/src/lib/Database/Supabase/badges.ts b/src/lib/Database/SB/badges.ts index 022d4d14..f67ffe97 100644 --- a/src/lib/Database/Supabase/badges.ts +++ b/src/lib/Database/SB/badges.ts @@ -1,4 +1,4 @@ -import supabase from '../supabase'; +import sb from '../sb'; interface Badge { id: number; @@ -26,24 +26,22 @@ interface GetBy { export const getBadges = async (getBy?: GetBy) => { let data, error; - if (getBy?.event) - [data, error] = await supabase.from('badges').select('*').eq('event', getBy.event); + if (getBy?.event) [data, error] = await sb.from('badges').select('*').eq('event', getBy.event); else if (getBy?.group) - [data, error] = await supabase.from('badges').select('*').eq('group', getBy.group); - else [data, error] = await supabase.from('badges').select('*'); + [data, error] = await sb.from('badges').select('*').eq('group', getBy.group); + else [data, error] = await sb.from('badges').select('*'); if (error) return []; return data as Badge[]; }; -export const createBadge = async (badge: NewBadge) => await supabase.from('badges').insert(badge); +export const createBadge = async (badge: NewBadge) => await sb.from('badges').insert(badge); -export const deleteBadge = async (id: number) => - await supabase.from('badges').delete().eq('id', id); +export const deleteBadge = async (id: number) => await sb.from('badges').delete().eq('id', id); export const updateBadge = async (id: number, badge: NewBadge) => { if (!badge.updated_at) badge.updated_at = new Date().toISOString(); - return await supabase.from('badges').update(badge).eq('id', id); + return await sb.from('badges').update(badge).eq('id', id); }; diff --git a/src/lib/Database/Supabase/events.ts b/src/lib/Database/SB/events.ts index e87fe011..4691f158 100644 --- a/src/lib/Database/Supabase/events.ts +++ b/src/lib/Database/SB/events.ts @@ -1,5 +1,5 @@ import type Group from '$lib/Events/Group.svelte'; -import supabase from '../supabase'; +import sb from '../sb'; export interface Event { id: number; @@ -19,7 +19,7 @@ interface NewEvent { } export const getEvents = async () => { - const { data, error } = await supabase.from('events').select('*, group:groups(*)'); + const { data, error } = await sb.from('events').select('*, group:groups(*)'); if (error) return []; @@ -27,20 +27,19 @@ export const getEvents = async () => { }; export const getGroupEvents = async (group: string) => { - const { data, error } = await supabase.from('events').select('*').eq('group', group); + const { data, error } = await sb.from('events').select('*').eq('group', group); if (error) return []; return data as Event[]; }; -export const createEvent = async (event: NewEvent) => await supabase.from('events').insert(event); +export const createEvent = async (event: NewEvent) => await sb.from('events').insert(event); -export const deleteEvent = async (id: number) => - await supabase.from('events').delete().eq('id', id); +export const deleteEvent = async (id: number) => await sb.from('events').delete().eq('id', id); export const updateEvent = async (id: number, event: NewEvent) => { if (!event.updated_at) event.updated_at = new Date().toISOString(); - return await supabase.from('events').update(event).eq('id', id); + return await sb.from('events').update(event).eq('id', id); }; diff --git a/src/lib/Database/Supabase/groups.ts b/src/lib/Database/SB/groups.ts index b2770e4a..90bee45f 100644 --- a/src/lib/Database/Supabase/groups.ts +++ b/src/lib/Database/SB/groups.ts @@ -1,4 +1,4 @@ -import supabase from '../supabase'; +import sb from '../sb'; export interface Group { id: number; @@ -16,7 +16,7 @@ export interface Group { } export const getGroups = async () => { - const { data, error } = await supabase.from('groups').select('*'); + const { data, error } = await sb.from('groups').select('*'); if (error) return []; @@ -24,7 +24,7 @@ export const getGroups = async () => { }; export const getGroup = async (slug: string) => { - const { data, error } = await supabase.from('groups').select('*').eq('anilist_username', slug); + const { data, error } = await sb.from('groups').select('*').eq('anilist_username', slug); if (error || data.length === 0) return null; diff --git a/src/lib/Database/supabase.ts b/src/lib/Database/sb.ts index ba8cf8d5..96fc65da 100644 --- a/src/lib/Database/supabase.ts +++ b/src/lib/Database/sb.ts @@ -1,6 +1,6 @@ import { createClient } from '@supabase/supabase-js'; import { SUPABASE_URL, SUPABASE_ANON_KEY } from '$env/static/private'; -const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY); +const sb = createClient(SUPABASE_URL, SUPABASE_ANON_KEY); -export default supabase; +export default sb; diff --git a/src/lib/Events/Event.svelte b/src/lib/Events/Event.svelte index 49fd2b15..f31637ec 100644 --- a/src/lib/Events/Event.svelte +++ b/src/lib/Events/Event.svelte @@ -1,5 +1,5 @@ <script lang="ts"> - import type { Event } from '$lib/Database/Supabase/events'; + import type { Event } from '$lib/Database/SB/events'; import root from '$lib/Utility/root'; import locale from '$stores/locale'; diff --git a/src/lib/Events/Group.svelte b/src/lib/Events/Group.svelte index 843d1c18..6a100024 100644 --- a/src/lib/Events/Group.svelte +++ b/src/lib/Events/Group.svelte @@ -1,5 +1,5 @@ <script lang="ts"> - import type { Group } from '$lib/Database/Supabase/groups'; + import type { Group } from '$lib/Database/SB/groups'; import tooltip from '$lib/Tooltip/tooltip'; export let group: Group; diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index 88ee4e70..73907f01 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -6,7 +6,7 @@ import { chapterCount } from '$lib/Media/Manga/chapters'; import { pruneAllManga } from '$lib/Media/Manga/cache'; import manga from '$stores/manga'; - import { database } from '$lib/Database/IndexedDB/chapters'; + import { database } from '$lib/Database/IDB/chapters'; import settings from '$stores/settings'; import lastPruneTimes from '$stores/lastPruneTimes'; import ListTitle from '../ListTitle.svelte'; diff --git a/src/lib/Media/Manga/cache.ts b/src/lib/Media/Manga/cache.ts index 9cea6f74..d35bf64a 100644 --- a/src/lib/Media/Manga/cache.ts +++ b/src/lib/Media/Manga/cache.ts @@ -1,4 +1,4 @@ -import { database } from '../../Database/IndexedDB/chapters'; +import { database } from '../../Database/IDB/chapters'; import manga from '$stores/manga'; export const pruneAllManga = async () => { diff --git a/src/lib/Media/Manga/chapters.ts b/src/lib/Media/Manga/chapters.ts index bee7d032..a601fdc8 100644 --- a/src/lib/Media/Manga/chapters.ts +++ b/src/lib/Media/Manga/chapters.ts @@ -3,7 +3,7 @@ import { getChapterCount } from '$lib/Data/Manga/raw'; import proxy from '$lib/Utility/proxy'; import settings from '$stores/settings'; import type { UserIdentity } from '../../Data/AniList/identity'; -import { database } from '../../Database/IndexedDB/chapters'; +import { database } from '../../Database/IDB/chapters'; const getManga = async ( statusIn: string, diff --git a/src/lib/Media/Manga/volumes.ts b/src/lib/Media/Manga/volumes.ts index f3e4e493..d6fda96d 100644 --- a/src/lib/Media/Manga/volumes.ts +++ b/src/lib/Media/Manga/volumes.ts @@ -1,5 +1,5 @@ import type { Media } from '$lib/Data/AniList/media'; -import { database } from '../../Database/IndexedDB/chapters'; +import { database } from '../../Database/IDB/chapters'; export const volumeCount = async (manga: Media): Promise<number | null> => (await database.chapters.get(manga.id))?.volumes as number | null; diff --git a/src/lib/Tools/Wrapped/Tool.svelte b/src/lib/Tools/Wrapped/Tool.svelte index af90692b..81a60016 100644 --- a/src/lib/Tools/Wrapped/Tool.svelte +++ b/src/lib/Tools/Wrapped/Tool.svelte @@ -17,7 +17,7 @@ import { page } from '$app/stores'; import { clearAllParameters } from '../../Utility/parameters'; import SettingHint from '$lib/Settings/SettingHint.svelte'; - import { database } from '$lib/Database/IndexedDB/activities'; + import { database } from '$lib/Database/IDB/activities'; import Activity from './Top/Activity.svelte'; import Anime from './Top/Anime.svelte'; import Manga from './Top/Manga.svelte'; diff --git a/src/lib/User/BadgeWall/AWC.svelte b/src/lib/User/BadgeWall/AWC.svelte index b43832cb..c2268510 100644 --- a/src/lib/User/BadgeWall/AWC.svelte +++ b/src/lib/User/BadgeWall/AWC.svelte @@ -1,6 +1,6 @@ <script lang="ts"> import type { AWCBadgesGroup } from '$lib/Data/awc'; - import type { UserPreferences } from '$lib/Database/Supabase/User/preferences'; + import type { UserPreferences } from '$lib/Database/SB/User/preferences'; import { cdn, thumbnail } from '$lib/Utility/image'; import FallbackBadge from './FallbackBadge.svelte'; import './badges.css'; diff --git a/src/lib/User/BadgeWall/BadgePreview.svelte b/src/lib/User/BadgeWall/BadgePreview.svelte index bdf37447..107ed483 100644 --- a/src/lib/User/BadgeWall/BadgePreview.svelte +++ b/src/lib/User/BadgeWall/BadgePreview.svelte @@ -1,6 +1,6 @@ <script lang="ts"> import { thumbnail } from '$lib/Utility/image'; - import type { Badge } from '$lib/Database/Supabase/User/badges'; + import type { Badge } from '$lib/Database/SB/User/badges'; import { cdn } from '$lib/Utility/image'; import { databaseTimeToDate } from '$lib/Utility/time'; import locale from '$stores/locale'; diff --git a/src/lib/User/BadgeWall/Badges.svelte b/src/lib/User/BadgeWall/Badges.svelte index d77887ff..127c98c8 100644 --- a/src/lib/User/BadgeWall/Badges.svelte +++ b/src/lib/User/BadgeWall/Badges.svelte @@ -6,7 +6,7 @@ import FallbackImage from '$lib/Image/FallbackImage.svelte'; import { cdn, thumbnail } from '$lib/Utility/image'; import FallbackBadge from './FallbackBadge.svelte'; - import type { UserPreferences } from '$lib/Database/Supabase/User/preferences'; + import type { UserPreferences } from '$lib/Database/SB/User/preferences'; import type { IndexedBadge } from './badge'; export let ungroupedBadges: IndexedBadge[]; diff --git a/src/lib/User/BadgeWall/FallbackBadge.svelte b/src/lib/User/BadgeWall/FallbackBadge.svelte index 32321266..2f0bdabd 100644 --- a/src/lib/User/BadgeWall/FallbackBadge.svelte +++ b/src/lib/User/BadgeWall/FallbackBadge.svelte @@ -2,12 +2,12 @@ import { classifyDesignerName } from './badge'; import locale from '$stores/locale'; import { tweened } from 'svelte/motion'; - import type { Badge } from '../../Database/Supabase/User/badges'; + import type { Badge } from '../../Database/SB/User/badges'; import Tooltip from '../../Tooltip/LinkedTooltip.svelte'; import { databaseTimeToDate } from '../../Utility/time'; import { cubicOut } from 'svelte/easing'; import { dev } from '$app/environment'; - import type { UserPreferences } from '$lib/Database/Supabase/User/preferences'; + import type { UserPreferences } from '$lib/Database/SB/User/preferences'; export let source: string | null | undefined; export let alternative: string | null | undefined; diff --git a/src/lib/User/BadgeWall/badge.ts b/src/lib/User/BadgeWall/badge.ts index f75fd1fe..834c0362 100644 --- a/src/lib/User/BadgeWall/badge.ts +++ b/src/lib/User/BadgeWall/badge.ts @@ -1,4 +1,4 @@ -import type { Badge } from '$lib/Database/Supabase/User/badges'; +import type { Badge } from '$lib/Database/SB/User/badges'; export interface IndexedBadge extends Badge { index: number; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 66f290d6..d9b257e9 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -29,7 +29,7 @@ import Announcement from '$lib/Announcement.svelte'; import Message from '$lib/Loading/Message.svelte'; import { requestNotifications } from '$lib/Utility/notifications'; - import { database as userDatabase } from '$lib/Database/IndexedDB/user'; + import { database as userDatabase } from '$lib/Database/IDB/user'; injectSpeedInsights(); diff --git a/src/routes/api/badges/+server.ts b/src/routes/api/badges/+server.ts index 036a6435..dfe25e7e 100644 --- a/src/routes/api/badges/+server.ts +++ b/src/routes/api/badges/+server.ts @@ -10,7 +10,7 @@ import { setShadowHidden, setShadowHiddenBadge, incrementClickCount -} from '$lib/Database/Supabase/User/badges'; +} from '$lib/Database/SB/User/badges'; import authorisedJson from '$lib/Data/Static/authorised.json'; const unauthorised = new Response('Unauthorised', { status: 401 }); diff --git a/src/routes/api/configuration/+server.ts b/src/routes/api/configuration/+server.ts index 78d5242d..65fd8d8b 100644 --- a/src/routes/api/configuration/+server.ts +++ b/src/routes/api/configuration/+server.ts @@ -3,7 +3,7 @@ import { deleteUserConfiguration, getUserConfiguration, setUserConfiguration -} from '$lib/Database/Supabase/User/configuration'; +} from '$lib/Database/SB/User/configuration'; const unauthorised = new Response('Unauthorised', { status: 401 }); diff --git a/src/routes/api/events/+server.ts b/src/routes/api/events/+server.ts index b09d4e98..2f7d72d4 100644 --- a/src/routes/api/events/+server.ts +++ b/src/routes/api/events/+server.ts @@ -1,4 +1,4 @@ -import { getEvents, getGroupEvents } from '$lib/Database/Supabase/events'; +import { getEvents, getGroupEvents } from '$lib/Database/SB/events'; export const GET = async ({ url }) => Response.json( diff --git a/src/routes/api/events/group/+server.ts b/src/routes/api/events/group/+server.ts index 20637de0..430578a3 100644 --- a/src/routes/api/events/group/+server.ts +++ b/src/routes/api/events/group/+server.ts @@ -1,4 +1,4 @@ -import { getGroup } from '$lib/Database/Supabase/groups'; +import { getGroup } from '$lib/Database/SB/groups'; export const GET = async ({ url }) => Response.json(await getGroup(url.searchParams.get('slug') || '')); diff --git a/src/routes/api/events/groups/+server.ts b/src/routes/api/events/groups/+server.ts index 7ed9c344..db50d0ad 100644 --- a/src/routes/api/events/groups/+server.ts +++ b/src/routes/api/events/groups/+server.ts @@ -1,3 +1,3 @@ -import { getGroups } from '$lib/Database/Supabase/groups'; +import { getGroups } from '$lib/Database/SB/groups'; export const GET = async () => Response.json(await getGroups()); diff --git a/src/routes/api/notifications/subscribe/+server.ts b/src/routes/api/notifications/subscribe/+server.ts index 9df39893..23a63a56 100644 --- a/src/routes/api/notifications/subscribe/+server.ts +++ b/src/routes/api/notifications/subscribe/+server.ts @@ -1,5 +1,5 @@ import { userIdentity } from '$lib/Data/AniList/identity'; -import { setUserSubscription } from '$lib/Database/Supabase/User/notifications'; +import { setUserSubscription } from '$lib/Database/SB/User/notifications'; const unauthorised = new Response('Unauthorised', { status: 401 }); diff --git a/src/routes/api/notifications/unsubscribe/+server.ts b/src/routes/api/notifications/unsubscribe/+server.ts index bfb9c6a1..94d7da2f 100644 --- a/src/routes/api/notifications/unsubscribe/+server.ts +++ b/src/routes/api/notifications/unsubscribe/+server.ts @@ -1,5 +1,5 @@ import { userIdentity } from '$lib/Data/AniList/identity'; -import { deleteUserSubscription } from '$lib/Database/Supabase/User/notifications'; +import { deleteUserSubscription } from '$lib/Database/SB/User/notifications'; const unauthorised = new Response('Unauthorised', { status: 401 }); diff --git a/src/routes/api/preferences/+server.ts b/src/routes/api/preferences/+server.ts index b969d57c..0b3be7e5 100644 --- a/src/routes/api/preferences/+server.ts +++ b/src/routes/api/preferences/+server.ts @@ -7,7 +7,7 @@ import { toggleHideAWCBadges, togglePinnedBadgeWallCategory, setPinnedBadgeWallCategories -} from '$lib/Database/Supabase/User/preferences'; +} from '$lib/Database/SB/User/preferences'; const unauthorised = new Response('Unauthorised', { status: 401 }); diff --git a/src/routes/api/preferences/pin/+server.ts b/src/routes/api/preferences/pin/+server.ts index f1ac4e3d..73c4d5de 100644 --- a/src/routes/api/preferences/pin/+server.ts +++ b/src/routes/api/preferences/pin/+server.ts @@ -1,5 +1,5 @@ import { userIdentity } from '$lib/Data/AniList/identity'; -import { toggleHololiveStreamPinning } from '$lib/Database/Supabase/User/preferences'; +import { toggleHololiveStreamPinning } from '$lib/Database/SB/User/preferences'; const unauthorised = new Response('Unauthorised', { status: 401 }); diff --git a/src/routes/events/group/[group]/+page.svelte b/src/routes/events/group/[group]/+page.svelte index 6cd0c8ba..01203563 100644 --- a/src/routes/events/group/[group]/+page.svelte +++ b/src/routes/events/group/[group]/+page.svelte @@ -1,6 +1,6 @@ <script lang="ts"> - import type { Group as GroupType } from '$lib/Database/Supabase/groups'; - import type { Event as EventType } from '$lib/Database/Supabase/events'; + import type { Group as GroupType } from '$lib/Database/SB/groups.js'; + import type { Event as EventType } from '$lib/Database/SB/events.js'; import Message from '$lib/Loading/Message.svelte'; import root from '$lib/Utility/root'; import { onMount } from 'svelte'; diff --git a/src/routes/events/groups/+page.svelte b/src/routes/events/groups/+page.svelte index a6e56b0e..a28e11a6 100644 --- a/src/routes/events/groups/+page.svelte +++ b/src/routes/events/groups/+page.svelte @@ -1,5 +1,5 @@ <script lang="ts"> - import type { Group as GroupType } from '$lib/Database/Supabase/groups'; + import type { Group as GroupType } from '$lib/Database/SB/groups'; import Message from '$lib/Loading/Message.svelte'; import root from '$lib/Utility/root'; import { onMount } from 'svelte'; diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte index a6da53b3..44e50df7 100644 --- a/src/routes/user/[user]/+page.svelte +++ b/src/routes/user/[user]/+page.svelte @@ -17,7 +17,7 @@ import SettingHint from '$lib/Settings/SettingHint.svelte'; import proxy from '$lib/Utility/proxy'; import { parseScheduleHtml } from '$lib/Data/hololive'; - import type { UserPreferences } from '$lib/Database/Supabase/User/preferences'; + import type { UserPreferences } from '$lib/Database/SB/User/preferences'; import SvelteMarkdown from 'svelte-markdown'; import MarkdownLink from '$lib/MarkdownLink.svelte'; import LinkedTooltip from '$lib/Tooltip/LinkedTooltip.svelte'; diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte index f8837407..499233ce 100644 --- a/src/routes/user/[user]/badges/+page.svelte +++ b/src/routes/user/[user]/badges/+page.svelte @@ -2,7 +2,7 @@ import AWC from './../../../../lib/User/BadgeWall/AWC.svelte'; import { userIdentity } from '$lib/Data/AniList/identity'; import { user, type User } from '$lib/Data/AniList/user'; - import type { Badge } from '$lib/Database/Supabase/User/badges'; + import type { Badge } from '$lib/Database/SB/User/badges'; // import { domToBlob } from 'modern-screenshot'; import { onDestroy, onMount } from 'svelte'; import HeadTitle from '$lib/Home/HeadTitle.svelte'; @@ -18,7 +18,7 @@ import SettingHint from '$lib/Settings/SettingHint.svelte'; import Popup from '$lib/Layout/Popup.svelte'; import { page } from '$app/stores'; - import type { UserPreferences } from '$lib/Database/Supabase/User/preferences'; + import type { UserPreferences } from '$lib/Database/SB/User/preferences'; import { browser } from '$app/environment'; // import { io } from 'socket.io-client'; import BadgePreview from '$lib/User/BadgeWall/BadgePreview.svelte'; diff --git a/src/service-worker.ts b/src/service-worker.ts index 0de69bdf..3e31005f 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -4,7 +4,7 @@ /// <reference lib="webworker" /> import { build, files, version } from '$service-worker'; -import { database } from './lib/Database/IndexedDB/user'; +import { database } from './lib/Database/IDB/user'; import { notifications } from './lib/Data/AniList/notifications'; const sw = self as unknown as ServiceWorkerGlobalScope; |