🗑️ Clean

This commit is contained in:
Sébastien CUVELLIER 2023-03-11 17:53:14 +01:00
parent f60b9e421f
commit c8bce870ab
2 changed files with 3 additions and 6 deletions

View file

@ -2,7 +2,7 @@ import { Priority } from "../enum/priority";
export interface MessageHeader {
priority: Priority;
title: String;
tags: String;
actions: String;
title: string;
tags: string;
actions: string;
}

View file

@ -4,7 +4,6 @@ import { Priority } from "../enum/priority";
export class GrafanaService {
public async postAlert(req: Request): Promise<void> {
console.log(req.body)
const messagePriotity = getPriority(req.body.status);
const messageTitle = req.body.commonAnnotations.summary;
const messageDescription = req.body.commonAnnotations.description;
@ -12,8 +11,6 @@ export class GrafanaService {
const messageActions = getActions(req.body.alerts[0].silenceURL, req.body.alerts[0].dashboardURL);
const message = new NtfyMessage(messageTitle, messageDescription, messagePriotity, messageTags, messageActions);
await message.publish();
}
}