Run playwright tests on pull request as well

This commit is contained in:
thiloho
2024-09-13 18:45:23 +02:00
parent 08aca588d0
commit db8b284d6f
6 changed files with 14 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import { redirect } from "@sveltejs/kit";
import { API_BASE_PREFIX } from "$lib/server/utils";
import type { User } from "$lib/db-schema";
export const handle = async ({ event, resolve }) => {
if (!event.url.pathname.startsWith("/api/")) {
@@ -21,7 +22,7 @@ export const handle = async ({ event, resolve }) => {
throw redirect(303, "/");
}
const user = await userData.json();
const user: User = await userData.json();
event.locals.user = user;
}