Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
a2bd9b86
Commit
a2bd9b86
authored
Apr 04, 2024
by
Danny Liu
Browse files
style: npm run format
parent
0c43897f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
src/lib/apis/auths/index.ts
src/lib/apis/auths/index.ts
+6
-1
src/routes/auth/+page.svelte
src/routes/auth/+page.svelte
+6
-4
No files found.
src/lib/apis/auths/index.ts
View file @
a2bd9b86
...
@@ -58,7 +58,12 @@ export const userSignIn = async (email: string, password: string) => {
...
@@ -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`
,
{
...
...
src/routes/auth/+page.svelte
View file @
a2bd9b86
...
@@ -36,10 +36,12 @@
...
@@ -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(
toast.error(error);
(error) => {
return null;
toast.error(error);
});
return null;
}
);
await setSessionUser(sessionUser);
await setSessionUser(sessionUser);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment