Add offline fallback for user interests

cgen-f7a99da97c65425eb7484490c566ceab
This commit is contained in:
Builder.io 2025-10-04 21:35:50 +00:00
parent 129bea99d1
commit 89a9973440

View file

@ -549,6 +549,11 @@ export const aethexUserService = {
},
async addUserInterests(userId: string, interests: string[]): Promise<void> {
if (!isSupabaseConfigured) {
fallbackInterests.set(userId, Array.from(new Set(interests)));
return;
}
ensureSupabase();
await supabase
@ -577,6 +582,10 @@ export const aethexUserService = {
},
async getUserInterests(userId: string): Promise<string[]> {
if (!isSupabaseConfigured) {
return fallbackInterests.get(userId) ?? [];
}
ensureSupabase();
const { data, error } = await supabase