mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-10-31 23:00:34 +00:00
fix build + fix lint
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
49c46f9f72
commit
5328d3f4ed
2 changed files with 11 additions and 13 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
const form = useForm();
|
||||
$: submit = async (event: Event) => {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error FormData makes tsc sad
|
||||
const formData = new URLSearchParams(new FormData(event.target as HTMLFormElement));
|
||||
|
||||
promise = self
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
let promise = self
|
||||
.fetch(`/api/logout`, {
|
||||
method: 'post'
|
||||
})
|
||||
.then(async (response) => {
|
||||
if (response.ok) {
|
||||
goto('/');
|
||||
} else {
|
||||
const res = await response.json();
|
||||
throw new Error(res.message);
|
||||
}
|
||||
});
|
||||
let promise = fetch(`/api/logout`, {
|
||||
method: 'post'
|
||||
}).then(async (response) => {
|
||||
if (response.ok) {
|
||||
goto('/');
|
||||
} else {
|
||||
const res = await response.json();
|
||||
throw new Error(res.message);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{#await promise}
|
||||
|
|
Loading…
Reference in a new issue