I have a cloud code function that creates a GuestlistInvite
An object. It accepts a phone number, a guest list object, and a guest object.
I call the function as follows:
Parse.Cloud.run('createGuestlistInviteForExistingUser', {
phoneNumber: phoneNumber,
guestlist: guestlist,
guest: user
}).then(function(guestlistInvite) {
response.success(successfully created guestlistInvite');
});
Both user and user are pointers. However, in my logs I get an error message:
Result: Error: Parse Objects not allowed here
Any idea why this is happening?
Parse.Cloud.define('createGuestlistInviteForExistingUser', function(request, response) {
var phoneNumber = request.params.phoneNumber;
var guestlist = request.params.guestlist;
var guest = request.params.guest;
var guestlistInvite = new Parse.Object("GuestlistInvite");
guestlistInvite.save({
phoneNumber: phoneNumber,
Guestlist: guestlist,
Guest: guest,
checkInStatus: false,
response: 0
}).then(function(guestlistInvite) {
console.log('guestlistInvite for existing user was created');
response.success(guestlistInvite);
}, function(error) {
response.error('guestlistInvite was not saved');
});
});
source
share