refactor(backend): exist -> exists (#13203)

* refactor(backend): exist -> exists

* fix
This commit is contained in:
かっこかり 2024-02-08 16:04:41 +09:00 committed by GitHub
parent 90b633b5a6
commit 0f7918c51b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 64 additions and 64 deletions

View file

@ -74,12 +74,12 @@ export class SignupService {
const secret = generateUserToken();
// Check username duplication
if (await this.usersRepository.exist({ where: { usernameLower: username.toLowerCase(), host: IsNull() } })) {
if (await this.usersRepository.exists({ where: { usernameLower: username.toLowerCase(), host: IsNull() } })) {
throw new Error('DUPLICATED_USERNAME');
}
// Check deleted username duplication
if (await this.usedUsernamesRepository.exist({ where: { username: username.toLowerCase() } })) {
if (await this.usedUsernamesRepository.exists({ where: { username: username.toLowerCase() } })) {
throw new Error('USED_USERNAME');
}