fix context for cascade-saving and saving existing object (#6735)
* added test cases * fixed unparsed context when updating object * fixed context inheritance for cascade-saved objects * upgraded parse dependecy to 2.14.0 * rebuild * removed superfluous comments * undo lint changes
This commit is contained in:
@@ -91,8 +91,8 @@ function handleBatch(router, req) {
|
||||
return initialPromise.then(() => {
|
||||
const promises = req.body.requests.map(restRequest => {
|
||||
const routablePath = makeRoutablePath(restRequest.path);
|
||||
// Construct a request that we can send to a handler
|
||||
|
||||
// Construct a request that we can send to a handler
|
||||
const request = {
|
||||
body: restRequest.body,
|
||||
config: req.config,
|
||||
@@ -100,6 +100,9 @@ function handleBatch(router, req) {
|
||||
info: req.info,
|
||||
};
|
||||
|
||||
// Add context to request body
|
||||
if (req.body._context) { request.body._context = req.body._context; }
|
||||
|
||||
return router
|
||||
.tryRouteRequest(restRequest.method, routablePath, request)
|
||||
.then(
|
||||
|
||||
Reference in New Issue
Block a user