forked from MarseyWorld/MarseyWorld
master
parent
a16fd4989e
commit
7b2a217830
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue