Changelog: https://roxy-wi.org/changelog#6_3_1
pull/355/head
Pavel Loginov 2022-12-07 00:11:41 +03:00
parent 8ef0a52d25
commit 43efd1587e
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import json
import http.cookies
import pika
from jinja2 import Environment, FileSystemLoader
import modules.db.sql as sql
import modules.roxywi.common as roxywi_common
@ -214,6 +215,9 @@ def check_email_alert() -> None:
print(f'error: Cannot send a message {e}')
error_mess = 'error: All fields must be completed'
def add_telegram_channel(token: str, channel: str, group: str, page: str) -> None:
if token is None or channel is None or group is None:
print(error_mess)

View File

@ -1777,7 +1777,7 @@ if form.getvalue('ssh_cert'):
roxywi_common.logging("Roxy-WI server", f"A new SSH cert has been uploaded {ssh_keys}", roxywi=1, login=1)
if form.getvalue('newtelegram'):
import modules.alerting.alerting as alertin
import modules.alerting.alerting as alerting
token = common.checkAjaxInput(form.getvalue('newtelegram'))
channel = common.checkAjaxInput(form.getvalue('chanel'))
@ -1810,7 +1810,7 @@ if form.getvalue('slackdel') is not None:
import modules.alerting.alerting as alerting
channel_id = common.checkAjaxInput(form.getvalue('slackdel'))
slack = sql.select_slack(id=slackdel)
slack = sql.select_slack(id=channel_id)
alerting.delete_slack_channel(telegram, channel_id)