made changes in tanker controller

master
varun 3 years ago
parent 51a67ef69b
commit 4d790da73b

@ -175,7 +175,7 @@ exports.addBores = async (req, reply) => {
//const username = req.params.username; //const username = req.params.username;
var customerId = req.params.customerId; var customerId = req.params.customerId;
//console.log(req.params); console.log(customerId);
//const username = loginObject.user.username; //const username = loginObject.user.username;
//console.log(loginObject.user.username) //console.log(loginObject.user.username)
// const userInfo = await User.findOne({ username: username.toString() }); // const userInfo = await User.findOne({ username: username.toString() });

@ -163,11 +163,21 @@ module.exports = function (fastify, opts, next) {
fastify.route({ fastify.route({
method: "POST", method: "POST",
url: "/api/addBores", url: "/api/addBores/:customerId",
schema: { schema: {
tags: ["Supplier"], tags: ["Supplier"],
description: "This is to cretae New Bore", description: "This is to cretae New Bore",
summary: "This is to Create New Bore.", summary: "This is to Create New Bore.",
params: {
required: ["customerId"],
type: "object",
properties: {
customerId: {
type: "string",
description: "customerId",
},
},
},
body: { body: {
type: "object", type: "object",
properties: { properties: {

Loading…
Cancel
Save