aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/post/+server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/post/+server.ts')
-rw-r--r--src/routes/(app)/post/+server.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/routes/(app)/post/+server.ts b/src/routes/(app)/post/+server.ts
new file mode 100644
index 00000000..35c04186
--- /dev/null
+++ b/src/routes/(app)/post/+server.ts
@@ -0,0 +1,9 @@
+export async function POST({ cookies, params, 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);
+ }
+}