forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-09-08 19:49:46 +02:00
parent 774922b3f8
commit e105ff2afc
1 changed files with 47 additions and 0 deletions

View File

@ -88,6 +88,53 @@ def shop(v):
@app.post("/buy/<award>")
@auth_required
def buy(v, award):
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
}
}
if award not in AWARDS: abort(400)
price = AWARDS[award]["price"]
if v.patron: