안녕하세요 저는 파스를 백엔드로 사용하고 있는데, 나는 그것을 좋아하지만 afterSave 후크에 문제가 있습니다.Parse Cloud 코드 afterSave가 작동하지 않습니다.
Parse.Cloud.afterSave ("JGZwoelf",function (request) {
Parse.Push.send({
//Selecting the Channel
channels: [ request.object.get('JGZwoelfPush') ],
data: {
//Selecting the Key inside the Class
alert: request.object.get('AusfallInfo')
}
}, {
success: function() {
//Push was send successfully
},
error: function (error) {
//Handle error
throw "Got an error" + error.code + " : " + error.message;
}
});
});
로그 콘솔이 말해 때마다 : 결과 : 누락 된 채널 이름 :
catch되지는 error112있어 여기
내가 사용하고 코드입니다.
나는 단지 무엇이 잘못되었는지 이해하지 못합니다! 해당 자바 스크립트 코드에 있어야합니다. 내가 푸시 알림을 입력하면 수동으로 모든 작동합니다 :/
편집 : 부품 Parse.Push.send은 다음과 같아야합니다
채널 이름은 [ "exampleChannel"같은 것을 할 필요가Parse.Push.send ({
//Selecting the already existing Push Channel
channels: ["JGAchtPush"], //This has to be the name of your push channel!!
data: {
//Selecting the Key inside the Class
alert: request.object.get ("AusfallInfo")
}
}, {
success: function() {
//Push was sent successfully
//nothing was loged
},
error: function (error) {
throw "Got and error" + error.code + " : " + error.message;
}
});
]. 주어진 도움에 미리
감사합니다 :)