forked from rDrama/rDrama
master
parent
774922b3f8
commit
e105ff2afc
|
@ -88,6 +88,53 @@ def shop(v):
|
||||||
@app.post("/buy/<award>")
|
@app.post("/buy/<award>")
|
||||||
@auth_required
|
@auth_required
|
||||||
def buy(v, award):
|
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)
|
if award not in AWARDS: abort(400)
|
||||||
price = AWARDS[award]["price"]
|
price = AWARDS[award]["price"]
|
||||||
if v.patron:
|
if v.patron:
|
||||||
|
|
Loading…
Reference in New Issue