admin login

This commit is contained in:
Jan Prochazka
2024-07-26 16:40:17 +02:00
parent f697ba03f8
commit 38a80ec695
2 changed files with 15 additions and 2 deletions

View File

@@ -35,7 +35,10 @@
value={isAdminPage ? 'Log In as Administrator' : 'Log In'}
on:click={async e => {
enableApi();
const resp = await apiCall('auth/login', e.detail);
const resp = await apiCall('auth/login', {
isAdminPage,
...e.detail,
});
if (resp.error) {
internalRedirectTo(`/?page=not-logged&error=${encodeURIComponent(resp.error)}`);
return;