refactor: fix type

This commit is contained in:
syuilo
2023-02-01 17:29:28 +09:00
parent ebc6437977
commit 387fcd5c5d
5 changed files with 6 additions and 12 deletions

View File

@@ -134,7 +134,7 @@ export class DiscordServerService {
reply.redirect(oauth2!.getAuthorizeUrl(params));
});
fastify.get('/dc/cb', async (request, reply) => {
fastify.get<{ Querystring: { code: string; state: string; } }>('/dc/cb', async (request, reply) => {
const userToken = this.getUserToken(request);
const oauth2 = await getOAuth2();

View File

@@ -132,7 +132,7 @@ export class GithubServerService {
reply.redirect(oauth2!.getAuthorizeUrl(params));
});
fastify.get('/gh/cb', async (request, reply) => {
fastify.get<{ Querystring: { code: string; state: string; } }>('/gh/cb', async (request, reply) => {
const userToken = this.getUserToken(request);
const oauth2 = await getOath2();