require reason when banning a domain

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-17 10:16:14 +02:00
parent 24f68bc02f
commit e54c4a1f15
1 changed files with 1 additions and 0 deletions

View File

@ -1438,6 +1438,7 @@ def admin_toggle_ban_domain(v):
g.db.add(ma)
else:
if not reason: abort(400, 'Reason is required!')
d = BannedDomain(domain=domain, reason=reason)
g.db.add(d)
ma = ModAction(