mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
fix(build): 🐛 Add bodyOrJson middleware to server/api/v1/apps
This commit is contained in:
parent
959dd27ad6
commit
516bfb72e7
3 changed files with 45 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { randomBytes } from "node:crypto";
|
||||
import { applyConfig, handleZodError } from "@api";
|
||||
import { applyConfig, handleZodError, jsonOrForm } from "@api";
|
||||
import { zValidator } from "@hono/zod-validator";
|
||||
import { jsonResponse } from "@response";
|
||||
import type { Hono } from "hono";
|
||||
|
|
@ -32,6 +32,7 @@ export default (app: Hono) =>
|
|||
app.on(
|
||||
meta.allowedMethods,
|
||||
meta.route,
|
||||
jsonOrForm(),
|
||||
zValidator("form", schemas.form, handleZodError),
|
||||
async (context) => {
|
||||
const { client_name, redirect_uris, scopes, website } =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue