Refactor BASE URL.

This commit is contained in:
Skorpios committed 2025-02-02 21:45:45 -08:00
1 parent 0bb7eae71e
commit d3fb41acfe
1 file changed
+2 -1
+2 -1
View File
@@ -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 {