feat: add org_id to a user when signing up

This commit is contained in:
swve 2023-05-07 17:44:54 +00:00
parent b88ee6643e
commit 2b886ec2c2
5 changed files with 28 additions and 12 deletions

View file

@ -64,6 +64,7 @@ interface NewAccountBody {
username: string;
email: string;
password: string;
org_slug: string;
}
export async function signup(body: NewAccountBody): Promise<any> {
@ -76,7 +77,7 @@ export async function signup(body: NewAccountBody): Promise<any> {
redirect: "follow",
};
return fetch(`${getAPIUrl()}users/`, requestOptions)
return fetch(`${getAPIUrl()}users/?org_slug=${body.org_slug}`, requestOptions)
.then((result) => result.json())
.catch((error) => console.log("error", error));
}