Fehler von Jens gefixt

This commit is contained in:
Moritz Utcke
2025-02-12 12:28:17 +07:00
parent 23c95dab63
commit fe3b2809d9
10 changed files with 107 additions and 86 deletions

View File

@@ -6,6 +6,7 @@ import "svelte-ripple-action/ripple.css"
import DashboardSidebar from "../components/Dashboard/DashboardSidebar.svelte"
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import { createCaller } from "src/astro-typesafe-api-caller";
import { API_ACCESS_TOKEN_COOKIE_NAME } from "#lib/constants";
const valid = validateAccessTokenServer(Astro)
@@ -16,7 +17,11 @@ if (!valid) {
const caller = createCaller(Astro)
const benutzer = await caller.v1.benutzer.self()
const benutzer = await caller.user.self.GET.fetch(null, {
headers: {
Authorization: `Bearer ${Astro.cookies.get(API_ACCESS_TOKEN_COOKIE_NAME)?.value}`
}
})
export interface Props {
title: string;