Fix(backend): Limit antenna/webhook/list to exact amount (#14036)

... not +1
* Update antennas/clips e2e test
This commit is contained in:
Ryu jongheon
2024-06-18 12:18:04 +09:00
committed by GitHub
parent 379ce0145b
commit d0ee0203e1
9 changed files with 12 additions and 14 deletions

View File

@@ -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();
}