diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-02-04 19:19:30 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-02-04 19:19:30 +0900 |
| commit | 4ad0345f20869641b5629be7834fa05872273f90 (patch) | |
| tree | bfe95d4052c285592e9346f5f9ee8866a905fc58 /packages/backend/src/core/UserFollowingService.ts | |
| parent | 13.3.3 (diff) | |
| download | sharkey-4ad0345f20869641b5629be7834fa05872273f90.tar.gz sharkey-4ad0345f20869641b5629be7834fa05872273f90.tar.bz2 sharkey-4ad0345f20869641b5629be7834fa05872273f90.zip | |
fix(server): cannot follow user
Diffstat (limited to 'packages/backend/src/core/UserFollowingService.ts')
| -rw-r--r-- | packages/backend/src/core/UserFollowingService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/UserFollowingService.ts b/packages/backend/src/core/UserFollowingService.ts index 18a2ef5c05..2214a4862a 100644 --- a/packages/backend/src/core/UserFollowingService.ts +++ b/packages/backend/src/core/UserFollowingService.ts @@ -89,8 +89,8 @@ export class UserFollowingService { await this.userBlockingService.unblock(follower, followee); } else { // それ以外は単純に例外 - if (blocking != null) throw new IdentifiableError('710e8fb0-b8c3-4922-be49-d5d93d8e6a6e', 'blocking'); - if (blocked != null) throw new IdentifiableError('3338392a-f764-498d-8855-db939dcf8c48', 'blocked'); + if (blocking) throw new IdentifiableError('710e8fb0-b8c3-4922-be49-d5d93d8e6a6e', 'blocking'); + if (blocked) throw new IdentifiableError('3338392a-f764-498d-8855-db939dcf8c48', 'blocked'); } const followeeProfile = await this.userProfilesRepository.findOneByOrFail({ userId: followee.id }); @@ -353,8 +353,8 @@ export class UserFollowingService { this.userBlockingService.checkBlocked(followee.id, follower.id), ]); - if (blocking != null) throw new Error('blocking'); - if (blocked != null) throw new Error('blocked'); + if (blocking) throw new Error('blocking'); + if (blocked) throw new Error('blocked'); const followRequest = await this.followRequestsRepository.insert({ id: this.idService.genId(), |