forked from open-webui/open-webui
style: npm run format
This commit is contained in:
parent
0c43897f3d
commit
a2bd9b8639
2 changed files with 12 additions and 5 deletions
|
@ -58,7 +58,12 @@ export const userSignIn = async (email: string, password: string) => {
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userSignUp = async (name: string, email: string, password: string, profile_image_url: string) => {
|
export const userSignUp = async (
|
||||||
|
name: string,
|
||||||
|
email: string,
|
||||||
|
password: string,
|
||||||
|
profile_image_url: string
|
||||||
|
) => {
|
||||||
let error = null;
|
let error = null;
|
||||||
|
|
||||||
const res = await fetch(`${WEBUI_API_BASE_URL}/auths/signup`, {
|
const res = await fetch(`${WEBUI_API_BASE_URL}/auths/signup`, {
|
||||||
|
|
|
@ -36,10 +36,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const signUpHandler = async () => {
|
const signUpHandler = async () => {
|
||||||
const sessionUser = await userSignUp(name, email, password, generateInitialsImage(name)).catch((error) => {
|
const sessionUser = await userSignUp(name, email, password, generateInitialsImage(name)).catch(
|
||||||
|
(error) => {
|
||||||
toast.error(error);
|
toast.error(error);
|
||||||
return null;
|
return null;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
await setSessionUser(sessionUser);
|
await setSessionUser(sessionUser);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue