From 774922b3f81fe032691c515a61ef91a1a2de29f8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 8 Sep 2021 19:49:13 +0200 Subject: [PATCH] gf --- files/routes/awards.py | 94 +++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index ca8abe9794..7e1e5c3c27 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -6,56 +6,56 @@ from files.helpers.const import * from files.classes.award import * from flask import g, request -if site_name == "Drama": - AWARDS = { - "ban": { - "kind": "ban", - "title": "One-Day Ban", - "description": "Bans the author for a day.", - "icon": "fas fa-gavel", - "color": "text-danger", - "price": 5000 - }, - "shit": { - "kind": "shit", - "title": "Shit", - "description": "Makes flies swarm a post.", - "icon": "fas fa-poop", - "color": "text-black-50", - "price": 1000 - }, - "stars": { - "kind": "stars", - "title": "Stars", - "description": "Puts stars on the post.", - "icon": "fas fa-sparkles", - "color": "text-warning", - "price": 1000 - } - } -else: - AWARDS = { - "shit": { - "kind": "shit", - "title": "shit", - "description": "Makes flies swarm a post.", - "icon": "fas fa-poop", - "color": "text-black-50", - "price": 1000 - }, - "stars": { - "kind": "stars", - "title": "Stars", - "description": "Puts stars on the post.", - "icon": "fas fa-sparkles", - "color": "text-warning", - "price": 1000 - } - } - @app.get("/shop") @auth_required def shop(v): + if site_name == "Drama": + AWARDS = { + "ban": { + "kind": "ban", + "title": "One-Day Ban", + "description": "Bans the author for a day.", + "icon": "fas fa-gavel", + "color": "text-danger", + "price": 5000 + }, + "shit": { + "kind": "shit", + "title": "Shit", + "description": "Makes flies swarm a post.", + "icon": "fas fa-poop", + "color": "text-black-50", + "price": 1000 + }, + "stars": { + "kind": "stars", + "title": "Stars", + "description": "Puts stars on the post.", + "icon": "fas fa-sparkles", + "color": "text-warning", + "price": 1000 + } + } + else: + AWARDS = { + "shit": { + "kind": "shit", + "title": "shit", + "description": "Makes flies swarm a post.", + "icon": "fas fa-poop", + "color": "text-black-50", + "price": 1000 + }, + "stars": { + "kind": "stars", + "title": "Stars", + "description": "Puts stars on the post.", + "icon": "fas fa-sparkles", + "color": "text-warning", + "price": 1000 + } + } + query = g.db.query( User.id, User.username, User.patron, User.namecolor, AwardRelationship.kind.label('last_award_kind'), func.count(AwardRelationship.id).label('last_award_count')