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(
|
||||
req: Request<IProjectEnvironmentParams, CreateFeatureStrategySchema>,
|
||||
req: IAuthRequest<
|
||||
IProjectEnvironmentParams,
|
||||
CreateFeatureStrategySchema
|
||||
>,
|
||||
res: Response<CreateFeatureStrategySchema>,
|
||||
): Promise<void> {
|
||||
const { projectId, environment } = req.params;
|
||||
@ -172,6 +175,7 @@ export default class EnvironmentsController extends Controller {
|
||||
environment,
|
||||
projectId,
|
||||
strategy,
|
||||
extractUsername(req),
|
||||
);
|
||||
|
||||
this.openApiService.respondWithValidation(
|
||||
|
@ -131,7 +131,7 @@ export default class EnvironmentService {
|
||||
environment: string,
|
||||
projectId: string,
|
||||
strategy: CreateFeatureStrategySchema,
|
||||
username: string = 'unknown',
|
||||
username: string,
|
||||
): Promise<CreateFeatureStrategySchema> {
|
||||
if (strategy.name !== 'flexibleRollout') {
|
||||
throw new BadDataError(
|
||||
|
Loading…
Reference in New Issue
Block a user