From 9d4eefa33b8eddde6a03ce447cf9b7fb8102bddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Famibelle-Pronzola?= Date: Sun, 5 Mar 2023 12:45:13 +0400 Subject: [PATCH] Fix published error when no telegram config --- src/api/parole/content-types/parole/lifecycles.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/parole/content-types/parole/lifecycles.js b/src/api/parole/content-types/parole/lifecycles.js index 70e84be..f9a27bb 100644 --- a/src/api/parole/content-types/parole/lifecycles.js +++ b/src/api/parole/content-types/parole/lifecycles.js @@ -193,7 +193,9 @@ module.exports = { }) } - await axios.post(`${MESSAGE_URL}&text=${message}`) + if (TELEGRAM_API_TOKEN) { + await axios.post(`${MESSAGE_URL}&text=${message}`) + } } } },