mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 17:10:08 +00:00
38 lines
802 B
JavaScript
38 lines
802 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
type: 'admin',
|
|
routes: [
|
|
{
|
|
method: 'POST',
|
|
path: '/',
|
|
handler: 'email.send',
|
|
config: {
|
|
policies: ['admin::isAuthenticatedAdmin'],
|
|
},
|
|
},
|
|
{
|
|
method: 'POST',
|
|
path: '/test',
|
|
handler: 'email.test',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
{ name: 'admin::hasPermissions', options: { actions: ['plugin::email.settings.read'] } },
|
|
],
|
|
},
|
|
},
|
|
{
|
|
method: 'GET',
|
|
path: '/settings',
|
|
handler: 'email.getSettings',
|
|
config: {
|
|
policies: [
|
|
'admin::isAuthenticatedAdmin',
|
|
{ name: 'admin::hasPermissions', options: { actions: ['plugin::email.settings.read'] } },
|
|
],
|
|
},
|
|
},
|
|
],
|
|
};
|