Last active
December 23, 2016 11:56
-
-
Save pivanov/8eeb136724e6cf1e386230ef3517f33f to your computer and use it in GitHub Desktop.
getMessagesForUser.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('getMessagesForUser', function(request, response) { | |
var user = Parse.User.current(); | |
var query = new Parse.Query('Messages'); | |
query.equalTo('recipient', user); | |
query.find() | |
.then(function(messages) { | |
response.success(messages); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment