fix(test): CIが落ちている問題を修正 (#12816)
* fix(test): CIが落ちているのを修正 * fix(ci)?: CIの`typecheck`が落ちる問題を修正 * fix(ci): コンフィグファイルのタイポを修正
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user