From fefecfeb9aae5661caa7d0bcd4c7285b79e397a3 Mon Sep 17 00:00:00 2001 From: llino Date: Sat, 8 Sep 2018 13:20:34 +0100 Subject: [PATCH] Update 3.0.0.md (#5038) In example, the parameter is called request but in the function it was calling req --- 3.0.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0.0.md b/3.0.0.md index e265bac3..7059707a 100644 --- a/3.0.0.md +++ b/3.0.0.md @@ -13,7 +13,7 @@ In order to leverage those new nodejs features, you'll need to run at least node ```js // before Parse.Cloud.beforeSave('MyClassName', function(request, response) { - if (!passesValidation(req.object)) { + if (!passesValidation(request.object)) { response.error('Ooops something went wrong'); } else { response.success(); @@ -22,7 +22,7 @@ Parse.Cloud.beforeSave('MyClassName', function(request, response) { // after Parse.Cloud.beforeSave('MyClassName', (request) => { - if (!passesValidation(req.object)) { + if (!passesValidation(request.object)) { throw 'Ooops something went wrong'; } });