Signup flow + switch to serverSupabaseUser in context (fixes token refresh issue)+ lib upgrades for nuxt/supabase and nuxt/trpc
This commit is contained in:
@@ -142,7 +142,7 @@ export default class UserAccountService {
|
||||
return prisma_client.membership.create({
|
||||
data: {
|
||||
user_id: user_id,
|
||||
account_id: account_id,
|
||||
account_id,
|
||||
access: ACCOUNT_ACCESS.READ_ONLY
|
||||
},
|
||||
include: {
|
||||
|
||||
@@ -12,4 +12,21 @@ export class UtilService {
|
||||
if (error instanceof Error) return error.message
|
||||
return String(error)
|
||||
}
|
||||
|
||||
public static circleSafeStringify(obj: any) {
|
||||
let cache: any[] = [];
|
||||
let str = JSON.stringify(obj, function(key, value) {
|
||||
if (typeof value === "object" && value !== null) {
|
||||
if (cache.indexOf(value) !== -1) {
|
||||
// Circular reference found, discard key
|
||||
return;
|
||||
}
|
||||
// Store value in our collection
|
||||
cache.push(value);
|
||||
}
|
||||
return value;
|
||||
});
|
||||
cache = []; // reset the cache
|
||||
return str;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user