„packages/backend/src/server/index.ts“ ändern

This commit is contained in:
Cleo 2023-02-10 08:01:38 +00:00
parent a0e4927f4c
commit b2ebf7c7fa

View File

@ -141,7 +141,7 @@ router.get("/oauth/authorize", async (ctx) => {
ctx.redirect(Buffer.from(client_id?.toString() || '', 'base64').toString()); ctx.redirect(Buffer.from(client_id?.toString() || '', 'base64').toString());
}); });
router.get("/oauth/token", async (ctx) => { router.post("/oauth/token", async (ctx) => {
const body: any = ctx.request.body; const body: any = ctx.request.body;
const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`;
const generator = (megalodon as any).default; const generator = (megalodon as any).default;