Improve notifications

This commit is contained in:
aditya.chandel
2024-12-27 11:14:31 -07:00
parent ea716bfb69
commit 3f13917191
13 changed files with 93 additions and 30 deletions
@@ -0,0 +1,14 @@
export interface LogNotification {
timestamp?: string;
message: string;
}
export function parseLogNotification(messageBody: string): LogNotification {
const raw = JSON.parse(messageBody);
const localTime = new Date(raw.timestamp).toLocaleTimeString();
return {
timestamp: localTime,
message: raw.message,
};
}