Skip to content

Commit 246cf90

Browse files
committed
Fix limits
1 parent 3d74e09 commit 246cf90

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/labrinth/src/routes/v3/collections.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub async fn collection_create(
7878
.1;
7979

8080
let limits = UserLimits::get(&current_user, &client).await?;
81-
if limits.current.collections + 1 >= limits.max.collections {
81+
if limits.current.collections >= limits.max.collections {
8282
return Err(CreateError::LimitReached);
8383
}
8484

apps/labrinth/src/routes/v3/organizations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub async fn organization_create(
138138
.1;
139139

140140
let limits = UserLimits::get(&current_user, &pool).await?;
141-
if limits.current.organizations + 1 >= limits.max.organizations {
141+
if limits.current.organizations >= limits.max.organizations {
142142
return Err(CreateError::LimitReached);
143143
}
144144

apps/labrinth/src/routes/v3/project_creation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ async fn project_create_inner(
353353
.await?;
354354

355355
let limits = UserLimits::get(&current_user, pool).await?;
356-
if limits.current.projects + 1 >= limits.max.projects {
356+
if limits.current.projects >= limits.max.projects {
357357
return Err(CreateError::LimitReached);
358358
}
359359

0 commit comments

Comments
 (0)