blob: 59fc472e8e54a2eac717ffe989e5aabb034c737b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { auth, post } from "$lib/utils";
import { error, json } from "@sveltejs/kit";
export async function GET({ url }) {
console.log(url.searchParams.get("event"));
console.log(url.searchParams.get("uid"));
return json({});
}
export async function POST({ cookies, request }) {
const body = await request.json();
try {
const result = await post("/event", body, auth(cookies));
return json(result);
} catch (e: any) {
error(500, e.message);
}
}
|