temp test

This commit is contained in:
cutestnekoaqua 2023-02-10 22:30:19 +01:00
parent 65c73c67de
commit f2b014b4a8
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,8 @@ router.post("/oauth/token", koaBody({
multipart: true multipart: true
}), async (ctx) => { }), 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 BASE_URL = "http://localhost:3000";
const generator = (megalodon as any).default; const generator = (megalodon as any).default;
const client = generator('misskey', BASE_URL, null) as MegalodonInterface; const client = generator('misskey', BASE_URL, null) as MegalodonInterface;
const m = body.code.match(/^[a-zA-Z0-9-]+/); const m = body.code.match(/^[a-zA-Z0-9-]+/);