summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/ClipService.ts
diff options
context:
space:
mode:
authorRyu jongheon <lapy@lapy.link>2024-06-18 12:18:04 +0900
committerGitHub <noreply@github.com>2024-06-18 12:18:04 +0900
commitd0ee0203e12d41515b05d7d99ae09f70eeae5874 (patch)
tree74457d83725c3250ca1a1db36fcb5c024450b97f /packages/backend/src/core/ClipService.ts
parentfix(frontend): fix time on `MkChart`'s story (#13958) (diff)
downloadsharkey-d0ee0203e12d41515b05d7d99ae09f70eeae5874.tar.gz
sharkey-d0ee0203e12d41515b05d7d99ae09f70eeae5874.tar.bz2
sharkey-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/ClipService.ts')
-rw-r--r--packages/backend/src/core/ClipService.ts4
1 files changed, 2 insertions, 2 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();
}