Merged PR 2274: case deadline and watch stream on results
case deadline and wat Related work items: #22423, #22783
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { respondError } from "../middleware/apiResponse";
|
||||
import { relayGet } from "../middleware/relayForwarding";
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
const caseid = req.query.caseid;
|
||||
|
||||
if (typeof caseid !== "string" || caseid.trim().length === 0) {
|
||||
return respondError(res, {
|
||||
status: 400,
|
||||
code: "CASE_ID_REQUIRED",
|
||||
message: "caseid is required"
|
||||
});
|
||||
}
|
||||
|
||||
const queryUrl =
|
||||
"pinswg_casedeadlineextensions?$count=true&$filter=_pinswg_regardingcase_value eq " +
|
||||
caseid +
|
||||
" and pinswg_publishtoweb eq true&$select=pinswg_videoplatformurl,pinswg_eventrecordingid,pinswg_publishtoweb,pinswg_eventrecordingname,pinswg_eventrecordingpublisheddate,createdon";
|
||||
|
||||
return relayGet({
|
||||
queryUrl,
|
||||
res,
|
||||
errorResponse: {
|
||||
status: 400,
|
||||
code: "SIPS_MEDIA_FETCH_FAILED",
|
||||
message: "Failed to fetch SIPS media"
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user