mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 08:43:10 +02:00
fix(server): GitHub連携ができない問題を修正
This commit is contained in:
parent
f3e869ddae
commit
9cda400c80
1 changed files with 2 additions and 2 deletions
|
@ -13,8 +13,8 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
|
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
|
||||||
import { SigninService } from '../SigninService.js';
|
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
|
import { SigninService } from '../SigninService.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GithubServerService {
|
export class GithubServerService {
|
||||||
|
@ -227,7 +227,7 @@ export class GithubServerService {
|
||||||
'Authorization': `bearer ${accessToken}`,
|
'Authorization': `bearer ${accessToken}`,
|
||||||
})) as Record<string, unknown>;
|
})) as Record<string, unknown>;
|
||||||
|
|
||||||
if (typeof login !== 'string' || typeof id !== 'string') {
|
if (typeof login !== 'string' || typeof id !== 'number') {
|
||||||
throw new FastifyReplyError(400, 'invalid session');
|
throw new FastifyReplyError(400, 'invalid session');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue