mirror of
https://github.com/strapi/strapi.git
synced 2025-07-25 18:05:07 +00:00
64 lines
1.3 KiB
JavaScript
64 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = [
|
|
{
|
|
method: 'GET',
|
|
path: '/init',
|
|
handler: 'admin.init',
|
|
config: { auth: false },
|
|
},
|
|
{
|
|
method: 'GET',
|
|
path: '/project-type',
|
|
handler: 'admin.getProjectType',
|
|
config: { auth: false },
|
|
},
|
|
{
|
|
method: 'GET',
|
|
path: '/information',
|
|
handler: 'admin.information',
|
|
config: {
|
|
policies: ['admin::isAuthenticatedAdmin'],
|
|
},
|
|
},
|
|
{
|
|
method: 'GET',
|
|
path: '/plugins',
|
|
handler: 'admin.plugins',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
{ name: 'admin::hasPermissions', options: { actions: ['admin::marketplace.read'] } },
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'POST',
|
|
path: '/plugins/install',
|
|
handler: 'admin.installPlugin',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
{
|
|
name: 'admin::hasPermissions',
|
|
options: { actions: ['admin::marketplace.plugins.install'] },
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'DELETE',
|
|
path: '/plugins/uninstall/:plugin',
|
|
handler: 'admin.uninstallPlugin',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
{
|
|
name: 'admin::hasPermissions',
|
|
options: { actions: ['admin::marketplace.plugins.uninstall'] },
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|