diff options
| author | Ryu jongheon <lapy@lapy.link> | 2024-06-18 12:18:04 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-18 12:18:04 +0900 |
| commit | d0ee0203e12d41515b05d7d99ae09f70eeae5874 (patch) | |
| tree | 74457d83725c3250ca1a1db36fcb5c024450b97f /packages/backend/src/core | |
| parent | fix(frontend): fix time on `MkChart`'s story (#13958) (diff) | |
| download | misskey-d0ee0203e12d41515b05d7d99ae09f70eeae5874.tar.gz misskey-d0ee0203e12d41515b05d7d99ae09f70eeae5874.tar.bz2 misskey-d0ee0203e12d41515b05d7d99ae09f70eeae5874.zip | |
Fix(backend): Limit antenna/webhook/list to exact amount (#14036)
... not +1
* Update antennas/clips e2e test
Diffstat (limited to 'packages/backend/src/core')
| -rw-r--r-- | packages/backend/src/core/ClipService.ts | 4 | ||||
| -rw-r--r-- | packages/backend/src/core/UserListService.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/core/ClipService.ts b/packages/backend/src/core/ClipService.ts index 9fd1ebad87..929a9db064 100644 --- a/packages/backend/src/core/ClipService.ts +++ b/packages/backend/src/core/ClipService.ts @@ -41,7 +41,7 @@ export class ClipService { const currentCount = await this.clipsRepository.countBy({ userId: me.id, }); - if (currentCount > (await this.roleService.getUserPolicies(me.id)).clipLimit) { + if (currentCount >= (await this.roleService.getUserPolicies(me.id)).clipLimit) { throw new ClipService.TooManyClipsError(); } @@ -102,7 +102,7 @@ export class ClipService { const currentCount = await this.clipNotesRepository.countBy({ clipId: clip.id, }); - if (currentCount > (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) { + if (currentCount >= (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) { throw new ClipService.TooManyClipNotesError(); } diff --git a/packages/backend/src/core/UserListService.ts b/packages/backend/src/core/UserListService.ts index bbdcfed738..6333356fe9 100644 --- a/packages/backend/src/core/UserListService.ts +++ b/packages/backend/src/core/UserListService.ts @@ -95,7 +95,7 @@ export class UserListService implements OnApplicationShutdown, OnModuleInit { const currentCount = await this.userListMembershipsRepository.countBy({ userListId: list.id, }); - if (currentCount > (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) { + if (currentCount >= (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) { throw new UserListService.TooManyUsersError(); } |