40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
/**
|
|
* @swagger
|
|
* /api/endpoint/getpicklists_api:
|
|
* get:
|
|
* tags: [Case]
|
|
* description: Returns picklists for appeal tpyes
|
|
* summary: Phase 2
|
|
* parameters:
|
|
* - name: whichForm
|
|
* in: query
|
|
* required: true
|
|
* example: planningappeals78
|
|
* schema:
|
|
* type: string
|
|
* responses:
|
|
* 200:
|
|
* description: hello world
|
|
*/
|
|
|
|
const WORDKEY = process.env.HASHKEY;
|
|
|
|
const WEBAPI_URL =
|
|
process.env.RELAY_ROOT ||
|
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
|
|
|
export default async function ApiProxy(req, res) {
|
|
var whichForm = req.query.whichForm;
|
|
|
|
// var queryUrl =
|
|
// "EntityDefinitions(LogicalName='pinswg_" +
|
|
// whichForm +
|
|
// "')/Attributes/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=OptionSet,GlobalOptionSet&$count=true";
|
|
|
|
const pickListData = require("../../../data/picklistdata/pinswg_" +
|
|
whichForm +
|
|
".json");
|
|
|
|
return res.status(200).json(pickListData);
|
|
}
|