From d3fb41acfe7700e3641ec7120af9576e8118d6c7 Mon Sep 17 00:00:00 2001 From: Skorpios Date: Sun, 2 Feb 2025 21:45:45 -0800 Subject: [PATCH] Refactor BASE URL. --- Server/service/notificationService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/service/notificationService.js b/Server/service/notificationService.js index 374b1470e..66a7ea889 100644 --- a/Server/service/notificationService.js +++ b/Server/service/notificationService.js @@ -1,4 +1,5 @@ const SERVICE_NAME = "NotificationService"; +const TELEGRAM_API_BASE_URL = "https://api.telegram.org/bot"; class NotificationService { static SERVICE_NAME = SERVICE_NAME; @@ -35,7 +36,7 @@ class NotificationService { chat_id: chatId, text: `Monitor ${monitor.name} is ${status ? "up" : "down"}. URL: ${monitor.url}` }; - url = `https://api.telegram.org/bot${botToken}/sendMessage`; + url = `${TELEGRAM_API_BASE_URL}${botToken}/sendMessage`; } try {