alerts: per-support-team webhook + printedparts routing

This commit is contained in:
2026-07-22 13:32:01 -04:00
parent e1c7af049c
commit 73b05e5b1c
9 changed files with 142 additions and 21 deletions

View File

@@ -64,6 +64,7 @@ def create_support_team():
team = SupportTeam(
teamname=data['teamname'],
teamurl=data.get('teamurl'),
webhookurl=data.get('webhookurl'),
isactive=data.get('isactive', True))
db.session.add(team)
@@ -99,7 +100,7 @@ def update_support_team(team_id: int):
f"Support team '{data['teamname']}' already exists",
http_code=409)
for key in ['teamname', 'teamurl', 'isactive']:
for key in ['teamname', 'teamurl', 'webhookurl', 'isactive']:
if key in data:
setattr(team, key, data[key])