Add Zod validation
This commit is contained in:
parent
bedff8c0f5
commit
fff341d3cb
BIN
server/bun.lockb
BIN
server/bun.lockb
Binary file not shown.
@ -3,9 +3,11 @@
|
|||||||
"dev": "bun run --hot src/index.ts"
|
"dev": "bun run --hot src/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@hono/zod-validator": "^0.1.11",
|
||||||
"hono": "^4.0.3",
|
"hono": "^4.0.3",
|
||||||
"mariadb": "^3.2.3",
|
"mariadb": "^3.2.3",
|
||||||
"podcast": "^2.0.1"
|
"podcast": "^2.0.1",
|
||||||
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest"
|
"@types/bun": "latest"
|
||||||
|
@ -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();
|
|
||||||
}
|
|
@ -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;
|
export default app;
|
||||||
|
Loading…
Reference in New Issue
Block a user