Skip to content

Commit

Permalink
feat(gateway): temporary conditional project limit increase (#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 authored Nov 16, 2023
1 parent 03e7017 commit 4311907
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gateway/src/api/latest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,13 @@ async fn create_project(
AxumJson(config): AxumJson<project::Config>,
) -> Result<AxumJson<project::Response>, Error> {
// Check that the user is within their project limits.
let can_create_project = claim.can_create_project(service.get_project_count(&name).await?);
let temporary_increase = project_name.starts_with("cch23-") as u32;
let can_create_project = claim.can_create_project(
service
.get_project_count(&name)
.await?
.saturating_sub(temporary_increase),
);

let project = service
.create_project(
Expand Down

0 comments on commit 4311907

Please sign in to comment.