mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
Fix: Update sign up url to use org_id
This commit is contained in:
parent
53c8c6046f
commit
33b15acbe9
2 changed files with 4 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ function SignUpClient(props: SignUpClientProps) {
|
|||
const formik = useFormik({
|
||||
initialValues: {
|
||||
org_slug: props.org?.slug,
|
||||
org_id: props.org?.id,
|
||||
email: '',
|
||||
password: '',
|
||||
username: '',
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue