Add Zod validation

This commit is contained in:
Dave Smith-Hayes 2024-02-21 21:07:02 -05:00
parent bedff8c0f5
commit fff341d3cb
4 changed files with 3 additions and 22 deletions

Binary file not shown.

View File

@ -3,9 +3,11 @@
"dev": "bun run --hot src/index.ts"
},
"dependencies": {
"@hono/zod-validator": "^0.1.11",
"hono": "^4.0.3",
"mariadb": "^3.2.3",
"podcast": "^2.0.1"
"podcast": "^2.0.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/bun": "latest"

View File

@ -1,11 +0,0 @@
import { Context } from 'hono';
export default async function parsedForm(c: Context, next) {
if (c.req.method == 'POST') {
if (c.req.header('Content-Type') === 'application/x-www-form-urlencoded') {
}
}
next();
}

View File

@ -35,14 +35,4 @@ app.post('/register', async (c: Context) => {
}
});
app.post('/login', async (c: Context) => {
return c.json({ "success": true });
});
app.post('/create/channel', async (c: Context) => {
return c.json({ "success": true });
});
export default app;