mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 11:54:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			691 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			691 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
const { ACTIONS } = require('../constants');
 | 
						|
 | 
						|
module.exports = {
 | 
						|
  type: 'admin',
 | 
						|
  routes: [
 | 
						|
    {
 | 
						|
      method: 'GET',
 | 
						|
      path: '/configuration',
 | 
						|
      handler: 'view-configuration.findViewConfiguration',
 | 
						|
      config: {
 | 
						|
        policies: ['admin::isAuthenticatedAdmin'],
 | 
						|
      },
 | 
						|
    },
 | 
						|
    {
 | 
						|
      method: 'PUT',
 | 
						|
      path: '/configuration',
 | 
						|
      handler: 'view-configuration.updateViewConfiguration',
 | 
						|
      config: {
 | 
						|
        policies: [
 | 
						|
          'admin::isAuthenticatedAdmin',
 | 
						|
          {
 | 
						|
            name: 'admin::hasPermissions',
 | 
						|
            config: {
 | 
						|
              actions: [ACTIONS.configureView],
 | 
						|
            },
 | 
						|
          },
 | 
						|
        ],
 | 
						|
      },
 | 
						|
    },
 | 
						|
  ],
 | 
						|
};
 |