Skip to content

Instantly share code, notes, and snippets.

@pivanov
Created December 23, 2016 12:00
Show Gist options
  • Save pivanov/834a7383a2ac54b371d738d928ea5176 to your computer and use it in GitHub Desktop.
Save pivanov/834a7383a2ac54b371d738d928ea5176 to your computer and use it in GitHub Desktop.
getTotalMessageCountMigrated.js - Checklist for successful Parse migration by SashiDo
// 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);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment