fix(test): CIが落ちている問題を修正 (#12816)

* fix(test): CIが落ちているのを修正

* fix(ci)?: CIの`typecheck`が落ちる問題を修正

* fix(ci): コンフィグファイルのタイポを修正
This commit is contained in:
Chocolate Pie 2023-12-27 17:36:38 +09:00 committed by GitHub
parent e0040f5da3
commit a598baaf01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View file

@ -15,8 +15,6 @@ import { DI } from '@/di-symbols.js';
export const meta = {
tags: ['admin'],
secure: true,
res: {
type: 'object',
optional: false, nullable: false,
@ -48,12 +46,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private userEntityService: UserEntityService,
private signupService: SignupService,
) {
super(meta, paramDef, async (ps, _me) => {
super(meta, paramDef, async (ps, _me, token) => {
const me = _me ? await this.usersRepository.findOneByOrFail({ id: _me.id }) : null;
const noUsers = (await this.usersRepository.countBy({
host: IsNull(),
})) === 0;
if (!noUsers && !me?.isRoot) throw new Error('access denied');
if ((!noUsers && !me?.isRoot) || token !== null) throw new Error('access denied');
const { account, secret } = await this.signupService.signup({
username: ps.username,