Fehler von Jens gefixt
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user