mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
fix: add json support for importing
This commit is contained in:
parent
41b7c336e4
commit
4a907680f5
@ -36,6 +36,7 @@ class StateController extends Controller {
|
|||||||
this.logger = config.getLogger('/admin-api/state.ts');
|
this.logger = config.getLogger('/admin-api/state.ts');
|
||||||
this.stateService = stateService;
|
this.stateService = stateService;
|
||||||
this.fileupload('/import', upload.single('file'), this.import, ADMIN);
|
this.fileupload('/import', upload.single('file'), this.import, ADMIN);
|
||||||
|
this.post('/import', this.import, ADMIN);
|
||||||
this.get('/export', this.export, ADMIN);
|
this.get('/export', this.export, ADMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export const featureStrategySchema = joi
|
|||||||
featureName: joi.string(),
|
featureName: joi.string(),
|
||||||
projectId: joi.string(),
|
projectId: joi.string(),
|
||||||
environment: joi.string(),
|
environment: joi.string(),
|
||||||
parameters: joi.object().optional(),
|
parameters: joi.object().optional().allow(null),
|
||||||
constraints: joi.array().optional(),
|
constraints: joi.array().optional(),
|
||||||
strategyName: joi.string(),
|
strategyName: joi.string(),
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user