forked from MarseyWorld/MarseyWorld
lol im aevann now
parent
15d67f266d
commit
fd4c3dccc9
|
@ -9,7 +9,7 @@ GIPHY_KEY = environ.get('GIPHY_KEY').rstrip()
|
|||
|
||||
@app.route("/giphy", methods=["GET"])
|
||||
@app.route("/giphy<path>", methods=["GET"])
|
||||
def giphy():
|
||||
def giphy(path=None):
|
||||
|
||||
searchTerm = request.args.get("searchTerm", "")
|
||||
limit = int(request.args.get("limit", 48))
|
||||
|
@ -19,4 +19,4 @@ def giphy():
|
|||
url = f"https://api.giphy.com/v1/gifs/search?q={searchTerm}&api_key={GIPHY_KEY}&limit=48"
|
||||
else:
|
||||
url = f"https://api.giphy.com/v1/gifs?api_key={GIPHY_KEY}&limit=48"
|
||||
return jsonify(requests.get(url).json())
|
||||
return jsonify(requests.get(url).json())
|
||||
|
|
|
@ -134,7 +134,7 @@ def transfer_coins(v, username):
|
|||
g.db.commit()
|
||||
|
||||
transfer_message = f"🤑 [@{v.username}]({v.url}) has gifted you {amount} {app.config['COINS_NAME']}!"
|
||||
send_notification(v.id, receiver, transfer_message)
|
||||
send_notification(NOTIFICATIONS_ACCOUNT, receiver, transfer_message)
|
||||
return {"message": f"{amount} {app.config['COINS_NAME']} transferred!"}, 200
|
||||
|
||||
return {"message": f"{app.config['COINS_NAME']} transferred!"}
|
||||
|
|
Loading…
Reference in New Issue