mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	use camelCase comparison for up actions
This commit is contained in:
		
							parent
							
								
									989f29f11a
								
							
						
					
					
						commit
						9f4639e4a0
					
				@ -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}`,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user