fix: Accept invite in admin (#7393)

* fix: Accept invite in admin

* fix: Accept invite in admin

* minor fix
This commit is contained in:
Oli Juhl
2024-05-22 21:40:38 +02:00
committed by GitHub
parent bb5872de48
commit 4ee47cf9b1
13 changed files with 210 additions and 57 deletions
+12 -1
View File
@@ -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,
})
}
}