Update dependency node to v18 #15
@ -12,10 +12,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
import { page } from '$app/stores'
|
||||||
|
|
||||||
let auth = { username: "", password: "" };
|
let auth = { username: "", password: "" };
|
||||||
let pleaseWait = false;
|
let pleaseWait = false;
|
||||||
|
|
||||||
|
export let next = $page.url.searchParams.get('next');
|
||||||
|
|
||||||
function logmein() {
|
function logmein() {
|
||||||
pleaseWait = true;
|
pleaseWait = true;
|
||||||
fetch('api/auth', {
|
fetch('api/auth', {
|
||||||
@ -26,7 +29,11 @@
|
|||||||
response.json().then((auth) => {
|
response.json().then((auth) => {
|
||||||
pleaseWait = false;
|
pleaseWait = false;
|
||||||
$session = auth;
|
$session = auth;
|
||||||
goto(".");
|
if (next && next.indexOf('//') === -1) {
|
||||||
|
goto(next)
|
||||||
|
} else {
|
||||||
|
goto(".");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((response) => {
|
.catch((response) => {
|
||||||
|
Reference in New Issue
Block a user