i've already completed the firebase function that realized notification.
so i tried to change function Type , but fail.. how to change this code?
exports.sendNotification = functions.https.onRequest((request,response)=>{
const id = request.body.user_id;
const pw = request.body.user_pw;
const yourToken = request.body.yourToken;
const myToken = request.body.myToken;
var payload = {
notification:{
title : "notify",
body : "suceess to send."
},
data:{
title : "notify",
body : "suceess to send.",
user_id : id,
user_pw : pw,
myToken : myToken,
yourToken : yourToken,
}
};
response.send(admin.messaging().sendToDevice(yourToken, payload));
});
from this code to ..
exports.Notification = functions.https.onCall((data,context)=>{
});
this.