diff --git a/Webserver/src/routes/api/redirect/+server.ts b/Webserver/src/routes/api/redirect/+server.ts index b163d7e..f99b621 100644 --- a/Webserver/src/routes/api/redirect/+server.ts +++ b/Webserver/src/routes/api/redirect/+server.ts @@ -1,5 +1,5 @@ -import type { APIResponse } from "$lib/interfaces"; -import { json, type RequestHandler } from "@sveltejs/kit"; +import type { APIResponse } from '$lib/interfaces'; +import { json, type RequestHandler } from '@sveltejs/kit'; // GET Endpoint for redirection API export const GET: RequestHandler = async ({ url }) => { @@ -11,7 +11,7 @@ export const GET: RequestHandler = async ({ url }) => { // Call API and respond with new data const api_call = await fetch(`http://localhost:8080/${endpoint}`); - const data = await api_call.json() as APIResponse; + const data = (await api_call.json()) as APIResponse; return json(data); }; @@ -31,6 +31,6 @@ export const POST: RequestHandler = async ({ request }) => { mode: 'cors', body: formData }); - const data = await api_call.json() as APIResponse; + const data = (await api_call.json()) as APIResponse; return json(data); -}; \ No newline at end of file +};