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 supplier.description = suppliertobeInserted.description
} }
console.log("---------checkurl ecnoded string-----------------------"); console.log("---------checkurl ecnoded string-----------------------");
// Store hash in your password DB. // Store hash in your password DB.

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

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

@ -331,6 +331,7 @@ exports.motorAction = async (req, reply) => {
// } // }
if(supplier_tank_type==="bore" && receiver_type === "sump"){ if(supplier_tank_type==="bore" && receiver_type === "sump"){
const receiver_capacity = parseInt(receiver_tank_info.capacity.replace(/,/g, ''), 10) const receiver_capacity = parseInt(receiver_tank_info.capacity.replace(/,/g, ''), 10)
// console.log(receiver_capacity,"0",receiver_tank_info.tankName) // 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 apiUrl = `https://smslogin.co/v3/api.php?username=${username}&apikey=${apiKey}&senderid=${senderId}&mobile=${mobile}&message=${encodeURIComponent(message)}`;
const options = { const options = {
method: 'GET', method: 'GET',
headers: { headers: {

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

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

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

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

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

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

Loading…
Cancel
Save