UserRepo fixed oda so

This commit is contained in:
s-prechtl 2022-10-11 09:32:14 +02:00
parent d66b9272b7
commit 2d193969f7
3 changed files with 6 additions and 19 deletions

View file

@ -1,20 +1,6 @@
import {bearerFetch, jwt} from "../models/PomeloUtils";
import {StrapiUserRepo} from "../models/repos/user/StrapiUserRepo";
/** @type {import('./$types').PageLoad} */
export async function load() {
let invalid = !jwt;
if (!invalid) {
const request = await bearerFetch("/users/me", jwt);
const response = await request.json();
invalid = "error" in response;
}
if (invalid) {
if (typeof window !== 'undefined') {
// @ts-ignore
window.location = "/login";
}
}
// StrapiUserRepo.getInstance();
}

View file

@ -74,6 +74,7 @@
<style>
@import "src";
html,
body {
height: 100%;