mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
Gotify
This commit is contained in:
parent
0c9c1c599f
commit
ba3b48e8ce
12 changed files with 14 additions and 18 deletions
|
@ -8,13 +8,6 @@ export default async function credentialedProxyHandler(req, res) {
|
|||
if (group && service) {
|
||||
const widget = await getServiceWidget(group, service);
|
||||
|
||||
var headersData
|
||||
if(widget.type == "gotify"){
|
||||
headersData = {"X-gotify-Key": `${widget.key}`,"Content-Type": "application/json",}
|
||||
}else{
|
||||
headersData = {"X-API-Key": `${widget.key}`,"Content-Type": "application/json",}
|
||||
}
|
||||
|
||||
if (widget) {
|
||||
const url = new URL(formatApiCall(widget.type, { endpoint, ...widget }));
|
||||
|
||||
|
@ -24,6 +17,9 @@ export default async function credentialedProxyHandler(req, res) {
|
|||
|
||||
if (widget.type === "coinmarketcap") {
|
||||
headers["X-CMC_PRO_API_KEY"] = `${widget.key}`;
|
||||
}
|
||||
if(widget.type === "gotify"){
|
||||
headers["X-gotify-Key"] = `${widget.key}`;
|
||||
} else {
|
||||
headers["X-API-Key"] = `${widget.key}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue