diff --git a/app/controllers/salespd.controller.js b/app/controllers/salespd.controller.js index d970f5e..66e2f7d 100644 --- a/app/controllers/salespd.controller.js +++ b/app/controllers/salespd.controller.js @@ -4,6 +4,28 @@ const ApiCallHelper = require('../services/apicallhelper.js'); +exports.PullSalesPdData = async (req, res) => +{ + try + { + res.send({'status':200,'message':"success",'data':data}); + + } catch(err) { + res.send({'status':404,message: err.message || "Some error occurred while retrieving data." ,'data': "No data" }); + } //end of try catch + +}; +exports.PullSalesPdPhotographsData = async (req, res) => +{ + try + { + res.send({'status':200,'message':"success",'data':data}); + + } catch(err) { + res.send({'status':404,message: err.message || "Some error occurred while retrieving data." ,'data': "No data" }); + } //end of try catch + +}; //GeneralSection data List Api exports.SectionList = async (req, res) => { diff --git a/app/routes/routes.js b/app/routes/routes.js index fc66311..5942da7 100644 --- a/app/routes/routes.js +++ b/app/routes/routes.js @@ -9,7 +9,6 @@ module.exports = app => { - /** * @swagger * /api/demo: @@ -26,8 +25,80 @@ module.exports = app => { router.get('/salespd',Mycontroller.SalesPd) - - +/** +* @swagger +* definitions: +* PullSalesPdData: +* type: object +* properties: +* pdid: +* type: integer +* description: pdid +* example: 6646 +* product: +* type: string +* description: product +* example: LFMP +* data: +* type: string +* description: json string +* example: +*/ +/** +* @swagger +* /api/PullSalesPdData: +* post: +* summary: Pull SalesPd Data +* description: Pull SalesPd Data +* requestBody: +* content: +* application/json: +* schema: +* $ref: '#/definitions/PullSalesPdData' +* responses: +* 200: +* description: success +* 500: +* description: failed +*/ + router.post("/PullSalesPdData", SalesPdController.PullSalesPdData); + /** +* @swagger +* definitions: +* PullSalesPdPhotographsData: +* type: object +* properties: +* pdid: +* type: integer +* description: pdid +* example: 6646 +* product: +* type: string +* description: product +* example: LFMP +* data: +* type: string +* description: json string +* example: +*/ +/** +* @swagger +* /api/PullSalesPdPhotographsData: +* post: +* summary: Pull SalesPd Photographs Data +* description: Pull SalesPd Photographs Data +* requestBody: +* content: +* application/json: +* schema: +* $ref: '#/definitions/PullSalesPdPhotographsData' +* responses: +* 200: +* description: success +* 500: +* description: failed +*/ + router.post("/PullSalesPdPhotographsData", SalesPdController.PullSalesPdPhotographsData); //GeneralSection List Api /** * @swagger