added jsdoc definitions to apis
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getadvancedsearch_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Advanced search
|
||||
* parameters:
|
||||
* - name: searchstring
|
||||
* description: search string
|
||||
* in: query
|
||||
* required: false
|
||||
* example: {
|
||||
* "q":"cas-",
|
||||
* "lpa":"744c69f4-48da-eb11-aac5-00224800be9c",
|
||||
* "apt":"846040000",
|
||||
* "statuscode":"1"}
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
@@ -55,14 +78,14 @@ export default async function ApiProxy(req, res) {
|
||||
? " statuscode eq " + searchString.statuscode + " and"
|
||||
: "";
|
||||
|
||||
console.log(queryString);
|
||||
//console.log(queryString);
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
queryString +
|
||||
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
console.log(queryUrl);
|
||||
//console.log(queryString, "\n", queryUrl);
|
||||
|
||||
var apiResponse = _.isEmpty(searchString)
|
||||
? res.status(400).json()
|
||||
|
||||
Reference in New Issue
Block a user