aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/login.js5
-rw-r--r--src/routes/register.js6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/routes/login.js b/src/routes/login.js
new file mode 100644
index 00000000..771de9e1
--- /dev/null
+++ b/src/routes/login.js
@@ -0,0 +1,5 @@
+import { post } from '$lib/utils';
+
+export async function POST({ request }) {
+ return { body: await post('/login', await request.json()) };
+}
diff --git a/src/routes/register.js b/src/routes/register.js
new file mode 100644
index 00000000..9f79f94e
--- /dev/null
+++ b/src/routes/register.js
@@ -0,0 +1,6 @@
+import { post } from '$lib/utils';
+
+export async function POST({ request }) {
+ let user = await request.json();
+ return { body: await post('/register', { user }) };
+}