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