Fix: Update sign up url to use org_id

This commit is contained in:
Abdullah Mustapha 2023-12-29 10:55:04 +01:00
parent 53c8c6046f
commit 33b15acbe9
2 changed files with 4 additions and 1 deletions

View file

@ -122,6 +122,7 @@ interface NewAccountBody {
email: string;
password: string;
org_slug: string;
org_id:string;
}
export async function signup(body: NewAccountBody): Promise<any> {
@ -134,6 +135,7 @@ export async function signup(body: NewAccountBody): Promise<any> {
redirect: "follow",
};
const res = await fetch(`${getAPIUrl()}users/?org_slug=${body.org_slug}`, requestOptions);
const res = await fetch(`${getAPIUrl()}users/${body.org_id}`, requestOptions);
return res;
}