mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
feat: Limit exclude archived features (#4680)
This commit is contained in:
parent
392beee114
commit
14423c5870
@ -104,7 +104,7 @@ class ProjectStore implements IProjectStore {
|
||||
`SELECT EXISTS(SELECT 1
|
||||
FROM project_settings
|
||||
LEFT JOIN features ON project_settings.project = features.project
|
||||
WHERE project_settings.project = ?
|
||||
WHERE project_settings.project = ? AND features.archived_at IS NULL
|
||||
GROUP BY project_settings.project
|
||||
HAVING project_settings.feature_limit <= COUNT(features.project)) AS present`,
|
||||
[id],
|
||||
|
@ -170,7 +170,7 @@ export default class ArchiveController extends Controller {
|
||||
): Promise<void> {
|
||||
const userName = extractUsername(req);
|
||||
const { featureName } = req.params;
|
||||
await this.featureService.reviveToggle(featureName, userName);
|
||||
await this.featureService.reviveFeature(featureName, userName);
|
||||
res.status(200).end();
|
||||
}
|
||||
}
|
||||
|
@ -1823,7 +1823,7 @@ class FeatureToggleService {
|
||||
}
|
||||
|
||||
// TODO: add project id.
|
||||
async reviveToggle(featureName: string, createdBy: string): Promise<void> {
|
||||
async reviveFeature(featureName: string, createdBy: string): Promise<void> {
|
||||
const toggle = await this.featureToggleStore.revive(featureName);
|
||||
const tags = await this.tagStore.getAllTagsForFeature(featureName);
|
||||
await this.eventStore.store(
|
||||
|
Loading…
Reference in New Issue
Block a user