Skip to content

Instantly share code, notes, and snippets.

@pivanov
Last active December 23, 2016 12:03
Show Gist options
  • Save pivanov/b3825d8a211b1536d5d412ed86615888 to your computer and use it in GitHub Desktop.
Save pivanov/b3825d8a211b1536d5d412ed86615888 to your computer and use it in GitHub Desktop.
getTotalMessageCount.js - Checklist for successful Parse migration by SashiDo
// Parse.com Cloud Code
Parse.Cloud.define('getTotalMessageCount', function(request, response( {
Parse.Cloud.useMasterKey() // This should not longer be used!
var query = new Parse.Query('Messages');
query.count()
.then(function(count) {
response.success(count);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment