Skip to content

Commit

Permalink
fix: Default strategy event user (#5470)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Nov 28, 2023
1 parent 74e8d11 commit 05614ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/lib/routes/admin-api/project/environments.ts
Expand Up @@ -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;
Expand All @@ -172,6 +175,7 @@ export default class EnvironmentsController extends Controller {
environment,
projectId,
strategy,
extractUsername(req),
);

this.openApiService.respondWithValidation(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/services/environment-service.ts
Expand Up @@ -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(
Expand Down

1 comment on commit 05614ed

@vercel
Copy link

@vercel vercel bot commented on 05614ed Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.