🗑️ Clean
This commit is contained in:
parent
f60b9e421f
commit
c8bce870ab
2 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
|
@ -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();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue