mirror of
https://github.com/strapi/strapi.git
synced 2025-07-26 02:20:32 +00:00
65 lines
1.4 KiB
JavaScript
65 lines
1.4 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = [
|
|
{
|
|
method: 'GET',
|
|
path: '/iso-locales',
|
|
handler: 'iso-locales.listIsoLocales',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
['plugin::content-manager.hasPermissions', ['plugin::i18n.locale.read']],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'GET',
|
|
path: '/locales',
|
|
handler: 'locales.listLocales',
|
|
config: {
|
|
policies: ['admin::isAuthenticatedAdmin'],
|
|
},
|
|
},
|
|
{
|
|
method: 'POST',
|
|
path: '/locales',
|
|
handler: 'locales.createLocale',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
['plugin::content-manager.hasPermissions', ['plugin::i18n.locale.create']],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'PUT',
|
|
path: '/locales/:id',
|
|
handler: 'locales.updateLocale',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
['plugin::content-manager.hasPermissions', ['plugin::i18n.locale.update']],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'DELETE',
|
|
path: '/locales/:id',
|
|
handler: 'locales.deleteLocale',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
['plugin::content-manager.hasPermissions', ['plugin::i18n.locale.delete']],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'POST',
|
|
path: '/content-manager/actions/get-non-localized-fields',
|
|
handler: 'content-types.getNonLocalizedAttributes',
|
|
config: {
|
|
policies: ['admin::isAuthenticatedAdmin'],
|
|
},
|
|
},
|
|
];
|