mirror of
https://github.com/misskey-dev/misskey
synced 2024-11-28 14:58:36 +09:00
parent
a2e475f2e8
commit
b3ec47c3f4
@ -139,7 +139,7 @@ export class SignupApiService {
|
||||
|
||||
const isPreserved = instance.preservedUsernames.map(x => x.toLowerCase()).includes(username.toLowerCase());
|
||||
if (isPreserved) {
|
||||
throw new FastifyReplyError(400, 'USED_USERNAME');
|
||||
throw new FastifyReplyError(400, 'DENIED_USERNAME');
|
||||
}
|
||||
|
||||
const code = rndstr('a-z0-9', 16);
|
||||
@ -169,6 +169,7 @@ export class SignupApiService {
|
||||
try {
|
||||
const { account, secret } = await this.signupService.signup({
|
||||
username, password, host,
|
||||
ignorePreservedUsernames: (await this.usersRepository.countBy({ host: IsNull() })) === 0,
|
||||
});
|
||||
|
||||
const res = await this.userEntityService.pack(account, account, {
|
||||
|
Loading…
Reference in New Issue
Block a user