pullsalesPDAPI:GWM

This commit is contained in:
sriramv 2022-05-04 11:43:07 +05:30
parent 10b1577c86
commit c197af3f94
2 changed files with 96 additions and 3 deletions

View File

@ -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) =>
{

View File

@ -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