password forgot api change
This commit is contained in:
parent
af107e6845
commit
8f6e52813d
@ -1,7 +1,12 @@
|
||||
import admin from "firebase-admin";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
// import serviceAccount from "../googlefirebasePushnotification.json" with { type: "json" };
|
||||
import serviceAccount from "../googlefirebasePushnotification.json" assert { type: "json" };
|
||||
export const sendPushNotification = async (userToken,title, message) => {
|
||||
// import serviceAccount from "../googlefirebasePushnotification.json" assert { type: "json" };
|
||||
const serviceAccount = JSON.parse(
|
||||
readFileSync("./googlefirebasePushnotification.json", "utf8")
|
||||
);
|
||||
export const sendPushNotification = async (userToken, title, message) => {
|
||||
// const admin = require("firebase-admin");
|
||||
// const serviceAccount = require("./path/to/your-firebase-adminsdk.json");
|
||||
|
||||
|
20
app.js
20
app.js
@ -7,12 +7,16 @@ import bodyParser from "body-parser";
|
||||
import fileUpload from "express-fileupload"; // important pkg for file upload
|
||||
import cors from "cors";
|
||||
import cookieParser from "cookie-parser";
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
// firebase admin push notification
|
||||
import admin from "firebase-admin";
|
||||
// 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
|
||||
const serviceAccount = JSON.parse(
|
||||
readFileSync("./googlefirebasePushnotification.json", "utf8")
|
||||
);
|
||||
import designRoute from "./resources/Design/designRouter.js";
|
||||
app.use(express.json({ limit: "50mb" }));
|
||||
app.use(express.urlencoded({ extended: true, limit: "50mb" }));
|
||||
@ -282,9 +286,9 @@ app.use("/api/v1", attendance);
|
||||
app.use("/api/v1", leave);
|
||||
|
||||
// notification route
|
||||
app.use("/api",notification)
|
||||
app.use("/api", notification)
|
||||
// order routes
|
||||
app.use("/api",PdOrderRoute)
|
||||
app.use("/api", PdOrderRoute)
|
||||
//Inventory
|
||||
app.use("/api/inventory", InventoryRoute);
|
||||
// Sales
|
||||
@ -292,17 +296,17 @@ app.use("/api/sales", SalesRoute);
|
||||
//Task
|
||||
app.use("/api/task", TaskRoute);
|
||||
// RD Rotuts auth
|
||||
app.use("/api",RDRoute)
|
||||
app.use("/api", RDRoute)
|
||||
// RD Order routes
|
||||
app.use("/api",RDOrderRoute)
|
||||
app.use("/api", RDOrderRoute)
|
||||
// visit RD and PD
|
||||
app.use("/api", VisitRDandPDRoute);
|
||||
|
||||
// Announcemnt
|
||||
|
||||
app.use('/api',AnnouncementRoute)
|
||||
app.use('/api', AnnouncementRoute)
|
||||
|
||||
app.use('/api/transporter',Transporter)
|
||||
app.use('/api/transporter', Transporter)
|
||||
|
||||
|
||||
//config specialty
|
||||
@ -319,7 +323,7 @@ app.use("/api", Stock);
|
||||
// Email CMS
|
||||
// app.use("/api", RegisterEmail);
|
||||
//Reports
|
||||
app.use("/api/report",Report);
|
||||
app.use("/api/report", Report);
|
||||
//MobileApp
|
||||
app.use("/api/mobileapp", MobileAppRoute);
|
||||
export default app;
|
||||
|
Loading…
Reference in New Issue
Block a user