Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gateway): temporary conditional project limit increase #1383

Merged
merged 2 commits into from Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion gateway/src/api/latest.rs
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