remotes/1693045480750635534/spooky-22
Aevann1 2022-01-17 20:38:15 +02:00
parent a16fd4989e
commit 7b2a217830
2 changed files with 4 additions and 1 deletions

View File

@ -83,6 +83,9 @@ def shop(v):
@app.post("/buy/<award>")
@auth_required
def buy(v, award):
if award == 'benefactor' and not request.values.get("mb"):
return {"error": "You can only buy this award with marseybux."}, 403
AWARDS = deepcopy(AWARDS2)
if award not in AWARDS: abort(400)

View File

@ -63,7 +63,7 @@
<td style="font-weight: bold">{{a['owned']}}</td>
{% set kind = a['kind'] %}
<td style="font-weight: bold">
<a class="d-flex btn btn-success {% if v.coins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast('/buy/{{kind}}')"><span class="m-auto">Buy</span></a>
{% if a['kind'] != "benefactor" %}<a class="d-flex btn btn-success {% if v.coins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast('/buy/{{kind}}')"><span class="m-auto">Buy</span></a>{% endif %}
{% if a['kind'] != "grass" %}<a class="d-flex marseybux btn btn-success {% if v.procoins < a['price'] %}disabled{% endif %}" role="button" onclick="post_toast('/buy/{{kind}}?mb=true')"><span class="m-auto">Buy with Marseybux</span></a>{% endif %}
</td>
</tr>