mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: Default strategy event user (#5470)
This commit is contained in:
parent
74e8d1139d
commit
05614ed20d
@ -162,7 +162,10 @@ export default class EnvironmentsController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async updateDefaultStrategyForProjectEnvironment(
|
async updateDefaultStrategyForProjectEnvironment(
|
||||||
req: Request<IProjectEnvironmentParams, CreateFeatureStrategySchema>,
|
req: IAuthRequest<
|
||||||
|
IProjectEnvironmentParams,
|
||||||
|
CreateFeatureStrategySchema
|
||||||
|
>,
|
||||||
res: Response<CreateFeatureStrategySchema>,
|
res: Response<CreateFeatureStrategySchema>,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { projectId, environment } = req.params;
|
const { projectId, environment } = req.params;
|
||||||
@ -172,6 +175,7 @@ export default class EnvironmentsController extends Controller {
|
|||||||
environment,
|
environment,
|
||||||
projectId,
|
projectId,
|
||||||
strategy,
|
strategy,
|
||||||
|
extractUsername(req),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.openApiService.respondWithValidation(
|
this.openApiService.respondWithValidation(
|
||||||
|
@ -131,7 +131,7 @@ export default class EnvironmentService {
|
|||||||
environment: string,
|
environment: string,
|
||||||
projectId: string,
|
projectId: string,
|
||||||
strategy: CreateFeatureStrategySchema,
|
strategy: CreateFeatureStrategySchema,
|
||||||
username: string = 'unknown',
|
username: string,
|
||||||
): Promise<CreateFeatureStrategySchema> {
|
): Promise<CreateFeatureStrategySchema> {
|
||||||
if (strategy.name !== 'flexibleRollout') {
|
if (strategy.name !== 'flexibleRollout') {
|
||||||
throw new BadDataError(
|
throw new BadDataError(
|
||||||
|
Loading…
Reference in New Issue
Block a user