0👍
I couldn’t find a solution using the frontend, so I made an endpoint to send push through the backend. So the backend takes care of all the bulk shipping.
const dataObj = {
sound: "default",
title: this.dataObj.push_title,
body: this.dataObj.push_message,
};
await this.$http
.post(`/push/send-notification`, dataObj)
.then((response) => {
if (!response.data.success) {
this.goError(response.data.message);
} else {
this.goSuccess(response.data.message);
this.dataObj.push_title = "";
this.dataObj.push_message = "";
}
})
.catch(function (error) {
console.log(error);
});
- [Vuejs]-Why do sometimes white lines appear in my code like this?
- [Vuejs]-How to pass Dynamic Props through Routes in Vue 3?
Source:stackexchange.com