Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash committed Sep 1, 2024
1 parent ed4a1f7 commit 0dd6a28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ const Login: FC = () => {

const onSubmit = async (formData: LoginFormData) => {
setLoading(true);

const body = new FormData();
body.append("username", formData.username);
body.append("password", formData.password);

const res = await fetch(`${getPlatformURL()}login`, {
method: "POST",
body,
credentials: getCredentialsSetting(),
});
}).finally(() => setLoading(false));

const returnURL = decodeURIComponent(redirect ?? "") || "/";
if (res.ok) window.location.replace(returnURL);
Expand Down

0 comments on commit 0dd6a28

Please sign in to comment.