feat: implement membership confirmation flow and update related functionalities
This commit is contained in:
@@ -47,16 +47,13 @@ class AccountsApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name loadUserAccounts
|
||||
* Load only user-owned accounts (not just memberships).
|
||||
*/
|
||||
* @name loadUserAccounts
|
||||
* Load only user-owned accounts (not just memberships).
|
||||
*/
|
||||
async loadUserAccounts() {
|
||||
const authUser = await this.client.auth.getUser();
|
||||
|
||||
const {
|
||||
data,
|
||||
error: userError,
|
||||
} = authUser
|
||||
const { data, error: userError } = authUser;
|
||||
|
||||
if (userError) {
|
||||
throw userError;
|
||||
@@ -66,14 +63,16 @@ class AccountsApi {
|
||||
|
||||
const { data: accounts, error } = await this.client
|
||||
.from('accounts_memberships')
|
||||
.select(`
|
||||
.select(
|
||||
`
|
||||
account_id,
|
||||
user_accounts (
|
||||
name,
|
||||
slug,
|
||||
picture_url
|
||||
picture_url,
|
||||
)
|
||||
`,
|
||||
)
|
||||
`)
|
||||
.eq('user_id', user.id)
|
||||
.eq('account_role', 'owner');
|
||||
|
||||
@@ -88,7 +87,6 @@ class AccountsApi {
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
async loadTempUserAccounts() {
|
||||
const { data: accounts, error } = await this.client
|
||||
.from('user_accounts')
|
||||
|
||||
Reference in New Issue
Block a user