created delivery tracking sms, created accounts for user and particular supplier

master
varun 2 years ago
parent 0456cf6a21
commit 0d6dcc8dce

@ -135,6 +135,7 @@ exports.loginDeliveryBoy = async (req) => {
supplier.description = suppliertobeInserted.description
}
console.log("---------checkurl ecnoded string-----------------------");
// Store hash in your password DB.

@ -34,6 +34,7 @@ exports.orderStartedSms = async (request, reply) => {
}
};
const req = http.request(apiUrl, options, (res) => {
let data = '';
res.on('data', (chunk) => {

@ -695,6 +695,7 @@ exports.distrubanceStatus = async (req, reply) => {
}
reply.send({ status_code: 200, data: booking});
// return tank;
} catch (err) {

@ -331,6 +331,7 @@ exports.motorAction = async (req, reply) => {
// }
if(supplier_tank_type==="bore" && receiver_type === "sump"){
const receiver_capacity = parseInt(receiver_tank_info.capacity.replace(/,/g, ''), 10)
// console.log(receiver_capacity,"0",receiver_tank_info.tankName)

@ -424,6 +424,7 @@ exports.sendSms = async (request, reply) => {
const apiUrl = `https://smslogin.co/v3/api.php?username=${username}&apikey=${apiKey}&senderid=${senderId}&mobile=${mobile}&message=${encodeURIComponent(message)}`;
const options = {
method: 'GET',
headers: {

@ -29,6 +29,7 @@ const tankersSchema = new mongoose.Schema({
});
const tankersbookingSchema = new mongoose.Schema({
customerId: { type: String, default: null },

@ -149,6 +149,7 @@ module.exports = function (fastify, opts, next) {
fastify.get("/api/getsupplierbookings/:supplierId", {
schema: {
tags: ["Supplier"],

@ -382,6 +382,7 @@ module.exports = function (fastify, opts, next) {
handler: validationHandler.deleteDeliveryBoy,
});
fastify.route({
method: "PUT",

@ -793,6 +793,7 @@ module.exports = function (fastify, opts, next) {
},
},
security: [
{
basicAuth: [],

@ -432,6 +432,7 @@ module.exports = function (fastify, opts, next) {
handler: tanksController.checkStatusofIot,
});
fastify.route({
method: 'GET',
url: '/waterlevel-sum',

@ -230,6 +230,7 @@ module.exports = function (fastify, opts, next) {
validationHandler.sendPasswordResetCode(request, reply);
},
});
fastify.route({
method: "POST",

Loading…
Cancel
Save