From e755061bc60dd1616cd8116f83b8741fdf28637b Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 9 Dec 2022 20:53:12 -0600 Subject: [PATCH] bannerurlsddssdsdsd --- files/routes/subs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/routes/subs.py b/files/routes/subs.py index c01ee5367..6ccc013c7 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -450,7 +450,7 @@ def get_sub_css(sub): @is_not_permabanned @ratelimit_user("1/second;10/day") def upload_sub_banner(v:User, sub:str): - if g.is_tor: abort(403, "Image uploads are not allowed through TOR.") + if g.is_tor: abort(403, "Image uploads are not allowed through Tor") sub = get_sub_by_name(sub) if not v.mods(sub.name): abort(403) @@ -465,7 +465,11 @@ def upload_sub_banner(v:User, sub:str): if bannerurl: if sub.bannerurls: sub.bannerurls.append(bannerurl) + else: + sub.bannerurls = [bannerurl] g.db.add(sub) + else: + abort(400, "No banner uploaded") ma = SubAction( sub=sub.name,