use camelCase comparison for up actions

This commit is contained in:
Pierre Noël 2021-09-29 17:53:36 +02:00
parent 989f29f11a
commit 9f4639e4a0

View File

@ -1,7 +1,6 @@
'use strict'; 'use strict';
const _ = require('lodash'); const _ = require('lodash');
const { toLower } = require('lodash/fp');
const createRouteScopeGenerator = namespace => route => { const createRouteScopeGenerator = namespace => route => {
const prefix = namespace.endsWith('::') ? namespace : `${namespace}.`; const prefix = namespace.endsWith('::') ? namespace : `${namespace}.`;
@ -12,7 +11,7 @@ const createRouteScopeGenerator = namespace => route => {
_.defaultsDeep(route, { _.defaultsDeep(route, {
config: { config: {
auth: { auth: {
scope: `${prefix}${controller}.${toLower(action)}`, scope: `${prefix}${controller}.${action}`,
}, },
}, },
}); });