Created
December 23, 2016 12:00
-
-
Save pivanov/834a7383a2ac54b371d738d928ea5176 to your computer and use it in GitHub Desktop.
getTotalMessageCountMigrated.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 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