TASK22224: harden file/static endpoint contracts and phase21 coverage

This commit is contained in:
2026-03-23 16:40:39 +00:00
parent 78cac2cbb9
commit f8fba6a561
7 changed files with 352 additions and 127 deletions
+9 -24
View File
@@ -1,29 +1,14 @@
import { respondSuccess } from "../middleware/apiResponse";
import { respondError, respondSuccess } from "../middleware/apiResponse";
// export default async function ApiProxy(req, res) {
// var caseid = req.query.caseid;
// var token = await getToken();
export default function ApiProxy(req, res) {
if (req.method && req.method !== "GET") {
return respondError(res, {
status: 405,
code: "METHOD_NOT_ALLOWED",
message: "Only GET is supported"
});
}
// var queryUrl =
// "pinswg_sipsevents?$filter=_pinswg_sipseventsid_value eq " +
// caseid +
// "&$count=true";
// return axios
// .get(
// WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
// azureHeaders(token.access_token),
// )
// .then(({ data }) => {
// res.status(200).json(data);
// })
// .catch((error) => {
// consoleLogger(error);
// res.status(400).json(error);
// });
// }
export default function ApiProx(req, res) {
const data = {
"@odata.count": 4,
"value": [