mirror of
https://github.com/strapi/strapi.git
synced 2025-08-22 07:38:41 +00:00
Improve routes exposed
This commit is contained in:
parent
b83d81f61a
commit
ecfa8ece41
@ -50,17 +50,19 @@ module.exports = scope => {
|
||||
policies: []
|
||||
};
|
||||
|
||||
newRoutes.routes['POST /' + scope.humanizeId + '/:id/relationships/:relation'] = {
|
||||
controller: scope.globalID,
|
||||
action: 'createRelation',
|
||||
policies: []
|
||||
};
|
||||
if (scope.template && scope.template !== 'mongoose') {
|
||||
newRoutes.routes['POST /' + scope.humanizeId + '/:id/relationships/:relation'] = {
|
||||
controller: scope.globalID,
|
||||
action: 'createRelation',
|
||||
policies: []
|
||||
};
|
||||
|
||||
newRoutes.routes['DELETE /' + scope.humanizeId + '/:id/relationships/:relation'] = {
|
||||
controller: scope.globalID,
|
||||
action: 'destroyRelation',
|
||||
policies: []
|
||||
};
|
||||
newRoutes.routes['DELETE /' + scope.humanizeId + '/:id/relationships/:relation'] = {
|
||||
controller: scope.globalID,
|
||||
action: 'destroyRelation',
|
||||
policies: []
|
||||
};
|
||||
}
|
||||
|
||||
return newRoutes;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user