Skip to content

Commit fefecfe

Browse files
llinoflovilmart
authored andcommitted
Update 3.0.0.md (#5038)
In example, the parameter is called request but in the function it was calling req
1 parent 462f5eb commit fefecfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

3.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In order to leverage those new nodejs features, you'll need to run at least node
1313
```js
1414
// before
1515
Parse.Cloud.beforeSave('MyClassName', function(request, response) {
16-
if (!passesValidation(req.object)) {
16+
if (!passesValidation(request.object)) {
1717
response.error('Ooops something went wrong');
1818
} else {
1919
response.success();
@@ -22,7 +22,7 @@ Parse.Cloud.beforeSave('MyClassName', function(request, response) {
2222

2323
// after
2424
Parse.Cloud.beforeSave('MyClassName', (request) => {
25-
if (!passesValidation(req.object)) {
25+
if (!passesValidation(request.object)) {
2626
throw 'Ooops something went wrong';
2727
}
2828
});

0 commit comments

Comments
 (0)