From e249b619698d732580c9957f0ce841e388a97aac Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Mon, 6 May 2024 08:42:58 +0000 Subject: [PATCH] fix(api): :bug: Add jsonOrForm to /oauth/token --- server/api/oauth/token/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/api/oauth/token/index.ts b/server/api/oauth/token/index.ts index 5813d5e5..d81b2d83 100644 --- a/server/api/oauth/token/index.ts +++ b/server/api/oauth/token/index.ts @@ -1,4 +1,4 @@ -import { applyConfig, handleZodError } from "@api"; +import { applyConfig, handleZodError, jsonOrForm } from "@api"; import { zValidator } from "@hono/zod-validator"; import { jsonResponse } from "@response"; import { eq } from "drizzle-orm"; @@ -63,6 +63,7 @@ export default (app: Hono) => app.on( meta.allowedMethods, meta.route, + jsonOrForm(), zValidator("form", schemas.form, handleZodError), async (context) => { const { grant_type, code, redirect_uri, client_id, client_secret } =