Skip to content

Commit

Permalink
feat(gateway): temporary conditional project limit increase
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 committed Nov 16, 2023
1 parent 03e7017 commit 7e7b91e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gateway/src/api/latest.rs
Expand Up @@ -208,7 +208,14 @@ 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?
.checked_sub(temporary_increase)
.unwrap_or(0),
);

let project = service
.create_project(
Expand Down

0 comments on commit 7e7b91e

Please sign in to comment.