How to set some parameters in their HTTPS functions in Firebase? I am creating an application, and when I created the application, I was able to increase the mailing list. Now I want to send mail, but I want to make sure that they can unsubscribe before sending anything.
I use Firebase for everything, and I managed to create a function that sends emails for each signed mail.
I can also "unsubscribe" from a specific mail, but this is hard-coded and not an optimal solution.
exports.testUnsub = functions.https.onRequest((req, res) => {
var db = admin.database();
var ref = db.ref("mailingList/-KhBOisltrOmv57Mrzus");
ref.child("subscribed").set(false);
console.log("-KhBOisltrOmv57Mrzus has unsubscribed from mailing list.");
});
The mail I'm sending has a url that triggers this https feature. I want to set a parameter on this url so that it becomes dynamic. Sort of:
https:
I am looking for everything that can help me in the right direction.