Files
pedwfrontend/pages/api/endpoint/getpicklists_api.js
T

25 lines
783 B
JavaScript

import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
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);
}