mirror of https://gitee.com/bigwinds/arangodb
Use forClient() in PUT/PATCH templates. Fixes #1350.
This commit is contained in:
parent
46187748f9
commit
efb062ea7b
|
@ -60,7 +60,7 @@ controller.get('/:id', function (req, res) {
|
|||
controller.put('/:id', function (req, res) {
|
||||
var id = req.urlParameters.id;
|
||||
var <%= modelInstance %> = req.parameters.<%= modelInstance %>;
|
||||
res.json(<%= repositoryInstance %>.replaceById(id, <%= modelInstance %>));
|
||||
res.json(<%= repositoryInstance %>.replaceById(id, <%= modelInstance %>).forClient());
|
||||
})
|
||||
.pathParam('id', <%= modelInstance %>IdSchema)
|
||||
.bodyParam('<%= modelInstance %>', {
|
||||
|
@ -77,7 +77,7 @@ controller.put('/:id', function (req, res) {
|
|||
controller.patch('/:id', function (req, res) {
|
||||
var id = req.urlParameters.id;
|
||||
var patchData = req.parameters.patch;
|
||||
res.json(<%= repositoryInstance %>.updateById(id, patchData));
|
||||
res.json(<%= repositoryInstance %>.updateById(id, patchData).forClient());
|
||||
})
|
||||
.pathParam('id', <%= modelInstance %>IdSchema)
|
||||
.bodyParam('patch', {
|
||||
|
|
Loading…
Reference in New Issue