我正在尝试将我的 Parse 应用程序迁移到 Parse Server。我收到以下错误(在Parse.User.beforeSave
)
Received an error with invalid JSON from Parse: Cannot POST /classes/_User
if (user.get('family')) {
var query = new Parse.Query('_User');
query.equalTo('family', user.get('family')); // got here ...
return query.count() // appears to fail here
.then(function(count) {
if (count < 10) {
return Parse.Promise.as();
} else {
return Parse.Promise.error('Family size cannot exceed 10.')
}
})
.fail(function(err) {
console.log('family size', err.message);
return Parse.Promise.error(err.message);
});
}
return Parse.Promise.as();
为什么它可能会尝试发布?