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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: feature creation limit crud together with frontend #4221

Merged
merged 12 commits into from
Jul 13, 2023

Conversation

sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Jul 12, 2023

  1. Add saving and reading limit to backend with migration
  2. Remove old project settings methods
  3. UI to disable creation on frontend

image

@vercel
Copy link

vercel bot commented Jul 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 9:15am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 9:15am

@@ -21,14 +21,14 @@ const getStatusCode = (errorName: string): number => {
return 400;
case 'MinimumOneEnvironmentError':
return 400;
case 'InvalidOperationError':
return 400;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InvalidOperation should not be related to authorization, so not 403, but rather 400

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use it for features behind a feature flag. We had a discussion about it and agreed on 403. Since it's forbidden behind a feature flag. I wouldn't change this one.

@@ -486,24 +505,6 @@ class ProjectStore implements IProjectStore {
return Number(members.count);
}

async getProjectSettings(projectId: string): Promise<IProjectSettings> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaning up leftover code

Copy link
Contributor

@kwasniew kwasniew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall a very good PR. I'd not change the HTTP status code

@sjaanus sjaanus merged commit 3da1cbb into main Jul 13, 2023
13 of 18 checks passed
@sjaanus sjaanus deleted the limit-integration branch July 13, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants