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

@ -61,6 +61,7 @@ function SignUpClient(props: SignUpClientProps) {
const formik = useFormik({ const formik = useFormik({
initialValues: { initialValues: {
org_slug: props.org?.slug, org_slug: props.org?.slug,
org_id: props.org?.id,
email: '', email: '',
password: '', password: '',
username: '', username: '',

View file

@ -122,6 +122,7 @@ interface NewAccountBody {
email: string; email: string;
password: string; password: string;
org_slug: string; org_slug: string;
org_id:string;
} }
export async function signup(body: NewAccountBody): Promise<any> { export async function signup(body: NewAccountBody): Promise<any> {
@ -134,6 +135,7 @@ export async function signup(body: NewAccountBody): Promise<any> {
redirect: "follow", 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; return res;
} }