fix: Accept invite in admin (#7393)
* fix: Accept invite in admin * fix: Accept invite in admin * minor fix
This commit is contained in:
@@ -10,7 +10,7 @@ export class Auth {
|
||||
this.config = config
|
||||
}
|
||||
|
||||
login = async (
|
||||
public login = async (
|
||||
scope: "admin" | "store",
|
||||
method: "emailpass",
|
||||
payload: { email: string; password: string }
|
||||
@@ -43,4 +43,15 @@ export class Auth {
|
||||
|
||||
this.client.clearToken()
|
||||
}
|
||||
|
||||
create = async (
|
||||
scope: "admin" | "store",
|
||||
method: "emailpass",
|
||||
payload: { email: string; password: string }
|
||||
): Promise<{ token: string }> => {
|
||||
return await this.client.fetch(`/auth/${scope}/${method}`, {
|
||||
method: "POST",
|
||||
body: payload,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user