This commit is contained in:
shamoon 2024-09-04 15:58:33 -07:00
parent d15b668a82
commit d47993f974

View File

@ -21,8 +21,9 @@ export default async function tdarrProxyHandler(req, res) {
logger.debug("Invalid or missing widget for service '%s' in group '%s'", service, group); logger.debug("Invalid or missing widget for service '%s' in group '%s'", service, group);
return res.status(400).json({ error: "Invalid proxy service type" }); return res.status(400).json({ error: "Invalid proxy service type" });
} }
const headers = {} const headers = {
headers["content-type"] = "application/json" "content-type": "application/json",
};
if (widget.key) { if (widget.key) {
headers["x-api-key"] = `${widget.key}`; headers["x-api-key"] = `${widget.key}`;
} }
@ -36,7 +37,7 @@ export default async function tdarrProxyHandler(req, res) {
docID: "statistics", docID: "statistics",
}, },
}), }),
headers: headers headers,
}); });
if (status !== 200) { if (status !== 200) {