aboutsummaryrefslogtreecommitdiff
path: root/src/handler/user.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/handler/user.ts')
-rw-r--r--src/handler/user.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/handler/user.ts b/src/handler/user.ts
index 28d6fbd..fe65eaa 100644
--- a/src/handler/user.ts
+++ b/src/handler/user.ts
@@ -2,3 +2,8 @@ import type { HandlerFunc, Context } from "https://deno.land/x/abc@master/mod.ts
import db from "../db/user.ts";
export const index: HandlerFunc = async (c: Context) => c.params.name;
+export const register: HandlerFunc = async (c: Context) => {
+ const { username, email, password } = await c.body();
+ await db.createUser(email, username, password);
+
+}