Last active
November 22, 2017 00:17
-
-
Save pivanov/5fa37d52cd55fb2f9d8a23eed66f9591 to your computer and use it in GitHub Desktop.
bla bla
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse Server Cloud Code | |
Parse.Cloud.define('getTotalMessageCount', function(request, response) { | |
var query = new Parse.Query('Messages'); | |
query.count({ useMasterKey: true }) // count() will use the master key to bypass ACLs | |
.then(function(count) { | |
response.success(count); | |
}); | |
}); | |
Parse.Cloud.define('SomethingCool', function(request, response) { | |
var query = new Parse.Query('Messages'); | |
query.count({ useMasterKey: true }) // count() will use the master key to bypass ACLs | |
.then(function(count) { | |
response.success(count); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment