made changes in tanker.js,tankercontrollers,tanker routes

master
varun 3 years ago
parent 17b0b38719
commit f49d0f0ed3

@ -78,7 +78,7 @@ console.log(req.params);
exports.addTankers1 = async (req, reply) => {
exports.deleteTankerInfo1 = async (req, reply) => {
try {
//const username = req.params.username;

@ -168,6 +168,7 @@ module.exports = function (fastify, opts, next) {
});
fastify.route({
@ -552,6 +553,36 @@ module.exports = function (fastify, opts, next) {
});
fastify.route({
method: "PUT",
url: "/api/deleteTanker1/:supplierId",
schema: {
tags: ["Supplier"],
summary: "This is to delete tanker",
params: {
required: ["supplierId"],
type: "object",
properties: {
supplierId: {
type: "string",
description: "supplierId",
},
},
},
querystring: {
tankerName: {type: 'string'}
},
security: [
{
basicAuth: [],
},
],
},
preHandler: fastify.auth([fastify.authenticate]),
handler: tankersController.deleteTankerInfo1,
});
next();

Loading…
Cancel
Save