password forgot api change
This commit is contained in:
parent
af107e6845
commit
8f6e52813d
@ -1,6 +1,11 @@
|
|||||||
import admin from "firebase-admin";
|
import admin from "firebase-admin";
|
||||||
|
import { readFileSync } from "fs";
|
||||||
|
|
||||||
// import serviceAccount from "../googlefirebasePushnotification.json" with { type: "json" };
|
// import serviceAccount from "../googlefirebasePushnotification.json" with { type: "json" };
|
||||||
import serviceAccount from "../googlefirebasePushnotification.json" assert { type: "json" };
|
// import serviceAccount from "../googlefirebasePushnotification.json" assert { type: "json" };
|
||||||
|
const serviceAccount = JSON.parse(
|
||||||
|
readFileSync("./googlefirebasePushnotification.json", "utf8")
|
||||||
|
);
|
||||||
export const sendPushNotification = async (userToken, title, message) => {
|
export const sendPushNotification = async (userToken, title, message) => {
|
||||||
// const admin = require("firebase-admin");
|
// const admin = require("firebase-admin");
|
||||||
// const serviceAccount = require("./path/to/your-firebase-adminsdk.json");
|
// const serviceAccount = require("./path/to/your-firebase-adminsdk.json");
|
||||||
|
6
app.js
6
app.js
@ -7,12 +7,16 @@ import bodyParser from "body-parser";
|
|||||||
import fileUpload from "express-fileupload"; // important pkg for file upload
|
import fileUpload from "express-fileupload"; // important pkg for file upload
|
||||||
import cors from "cors";
|
import cors from "cors";
|
||||||
import cookieParser from "cookie-parser";
|
import cookieParser from "cookie-parser";
|
||||||
|
import { readFileSync } from "fs";
|
||||||
|
|
||||||
// firebase admin push notification
|
// firebase admin push notification
|
||||||
import admin from "firebase-admin";
|
import admin from "firebase-admin";
|
||||||
// import serviceAccount from "./googlefirebasePushnotification.json" with { type: "json" };
|
// import serviceAccount from "./googlefirebasePushnotification.json" with { type: "json" };
|
||||||
import serviceAccount from "./googlefirebasePushnotification.json" assert { type: "json" };
|
// import serviceAccount from "./googlefirebasePushnotification.json" assert { type: "json" };
|
||||||
// Design Router
|
// Design Router
|
||||||
|
const serviceAccount = JSON.parse(
|
||||||
|
readFileSync("./googlefirebasePushnotification.json", "utf8")
|
||||||
|
);
|
||||||
import designRoute from "./resources/Design/designRouter.js";
|
import designRoute from "./resources/Design/designRouter.js";
|
||||||
app.use(express.json({ limit: "50mb" }));
|
app.use(express.json({ limit: "50mb" }));
|
||||||
app.use(express.urlencoded({ extended: true, limit: "50mb" }));
|
app.use(express.urlencoded({ extended: true, limit: "50mb" }));
|
||||||
|
Loading…
Reference in New Issue
Block a user