🐛 Fix 200

This commit is contained in:
Sébastien CUVELLIER 2023-03-11 19:05:30 +01:00
parent ede19bbc48
commit bb804385e0
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ export class GrafanaController {
console.log("Message forwarding to ntfy in progress ...")
await grafanaService.postAlert(req)
console.log("Message successfully forwarded.")
return res.status(200);
return res.status(200).send();
} catch (err) {
const error = err as Error;
console.error("An error occurred during the transmission of the message. Error:" + error.message);

View file

@ -11,7 +11,7 @@ app.use('/', indexRouter);
const PORT = 1111;
app.listen(PORT, () => {
const topic = process.env['NTFY_TOPIC'] as string || "grafana"
const server = process.env['NTFY_SERVER'] as string || "https://ntfy.sh/";
const server = process.env['NTFY_SERVER'] as string || "https://ntfy.sh";
console.log(`The server listens on the port: ${PORT}`);
console.log(`All alerts will be forwarded to: ${server}/${topic}`);
});