UnknownSec Bypass
403
:
/
var
/
www
/
stp-bhaktisagar-backend
/
src
/
util
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
firebase.js
const admin = require("firebase-admin"); var serviceAccount = require("../../sadanand-tp-86680-firebase-adminsdk-l13yo-4a1f1f5968.json"); const { getMessaging } = require("firebase-admin/messaging"); const fapp = admin.initializeApp({ credential: admin.credential.cert(serviceAccount), }); let messaging = getMessaging(fapp); var serviceAccountZ = require("../../zenithentcare.json"); const fappZ = admin.initializeApp({ credential: admin.credential.cert(serviceAccountZ), },'zent'); let messagingZ = getMessaging(fappZ); exports.sendPushNotification = ({ topic, tokens, title, body, options = {}, data = {}, }) => { let payload = { android: { priority: "high", // notification: { // channelId: "high_priority", // // content_available: true, // }, data: { notifee: JSON.stringify({ title: title, body: body, data: data, ...options, }), }, }, // without notifee lib // notification: { // title: title, // body: body, // }, // data: { // notifee: JSON.stringify({ // title: title, // body: body, // data: data, // }), // }, }; if (topic) { messaging .send({ topic, ...payload, }) .then((r) => { console.log(JSON.stringify(r)); }) .catch((err) => { console.log("err", JSON.stringify(err)); }); } else { messaging .sendEachForMulticast({ tokens, ...payload, }) .then((r) => { console.log(JSON.stringify(r)); }) .catch((err) => { console.log("err", JSON.stringify(err)); }); } }; exports.sendPushNotificationZenithentcare = ({ topic, tokens, title, body, options = {}, data = {}, }) => { return new Promise((res) => { let payload = { android: { priority: "high", // notification: { // channelId: "high_priority", // // content_available: true, // }, data: { notifee: JSON.stringify({ title: title, body: body, data: data, ...options, }), }, }, // without notifee lib // notification: { // title: title, // body: body, // }, // data: { // notifee: JSON.stringify({ // title: title, // body: body, // data: data, // }), // }, }; if (topic) { messagingZ .send({ topic, ...payload, }) .then((r) => { res(r); console.log(JSON.stringify(r)); }) .catch((err) => { res(err); console.log("err", JSON.stringify(err)); }); } else { messagingZ .sendEachForMulticast({ tokens, ...payload, }) .then((r) => { res(r); console.log(JSON.stringify(r)); }) .catch((err) => { res(err); console.log("err", JSON.stringify(err)); }); } }); }; exports.AndroidStyle = { BIGPICTURE: 0, BIGTEXT: 1, INBOX: 2, MESSAGING: 3, }; /////----SEND - NOTIFICATION----///// // sendPushNotification({ // topic:'public', // // tokens: [ // // "c6m3DIqWTYyThgGsc89X-b:APA91bFACyaCohI-6QrES6qRUdf07S-cx0sqtLC_Wg8q-iLiOT_U6Skw0S3EzlwvmSr9j406eiwhoTZmluU47giVaKFbDPcIADRYBakbvd1U_NnFtfb6tN5HPjETJJK_oxtAhaA-2MKm", // // ], // title: 'माघमेला सत्संग', // body: "माघमेला सत्संग 01 - 2006", // data: {}, // options: { // android: { // // largeIcon: 'logo', // // style: { // // type: AndroidStyle.BIGPICTURE, // // picture: "https://stp.santgyaneshwarji.org/thumb/6.jpg", // // // summary:"AAnjkbv vw vjhw evj wehjvw evjhw vhe", // // // title:'ererter' // // }, // }, // }, // });
Copyright © 2025 - UnknownSec