|
|
@ -2800,6 +2800,7 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
{ role: "Staff", name: users.staff.staff.find(staff => staff.phone === phone).name, phone } : null;
|
|
|
|
{ role: "Staff", name: users.staff.staff.find(staff => staff.phone === phone).name, phone } : null;
|
|
|
|
|
|
|
|
|
|
|
|
if (!loggedInUser) return reply.status(404).send({ error: "User not found" });
|
|
|
|
if (!loggedInUser) return reply.status(404).send({ error: "User not found" });
|
|
|
|
|
|
|
|
console.log(loggedInUser)
|
|
|
|
|
|
|
|
|
|
|
|
const fcmToken = users.fcmIds ? users.fcmIds.filter(id => id) : [];
|
|
|
|
const fcmToken = users.fcmIds ? users.fcmIds.filter(id => id) : [];
|
|
|
|
const receiverTank = await Tank.findOne({ customerId, tankName: req.body.to, tankLocation: req.body.to_type.toLowerCase() });
|
|
|
|
const receiverTank = await Tank.findOne({ customerId, tankName: req.body.to, tankLocation: req.body.to_type.toLowerCase() });
|
|
|
|