mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
815a75a5b4
Adds environment support This PR adds environments as a first-class concept in Unleash. It necessitated a full rewrite on how we connect feature <-> strategy, as well as a rethink on which levels environments makes sense. This enables PUTs on strategy configurations for a feature, since all strategies now have ids. This also updates export/import format. The importer handles both formats, but export is no longer possible in version 1 of the export format, only in version 2, with strategy configurations for a feature as a separate object. Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com> Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
16 lines
698 B
TypeScript
16 lines
698 B
TypeScript
import Controller from '../../controller';
|
|
import { IUnleashConfig } from '../../../types/option';
|
|
import { IUnleashServices } from '../../../types/services';
|
|
import ProjectFeaturesController from './features';
|
|
import EnvironmentsController from './environments';
|
|
import ProjectHealthReport from './health-report';
|
|
|
|
export default class ProjectApi extends Controller {
|
|
constructor(config: IUnleashConfig, services: IUnleashServices) {
|
|
super(config);
|
|
this.use('/', new ProjectFeaturesController(config, services).router);
|
|
this.use('/', new EnvironmentsController(config, services).router);
|
|
this.use('/', new ProjectHealthReport(config, services).router);
|
|
}
|
|
}
|