Last active
December 23, 2016 12:03
-
-
Save pivanov/b3825d8a211b1536d5d412ed86615888 to your computer and use it in GitHub Desktop.
getTotalMessageCount.js - Checklist for successful Parse migration by SashiDo
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.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