Skip to content

Commit

Permalink
fix(helpers): Replace deleted utility by lodash function
Browse files Browse the repository at this point in the history
This broke in d44d67a
  • Loading branch information
kellnerd committed Jun 5, 2024
1 parent b3bc879 commit 7efe40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/helpers/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export function checkValidTypeId(req: $Request, res: $Response, next: NextFuncti
export function checkValidEntityType(req: $Request, res: $Response, next: NextFunction, entityType: string) {
const entityTypes = ENTITY_TYPES.map(entity => _.snakeCase(entity));
if (!_.includes(entityTypes, entityType)) {
return next(new error.BadRequestError(`Invalid Entity Type: ${commonUtils.snakeCaseToSentenceCase(entityType)}`, req));
return next(new error.BadRequestError(`Invalid Entity Type: ${_.startCase(entityType)}`, req));
}
return next();
}
Expand Down

0 comments on commit 7efe40e

Please sign in to comment.