lol im aevann now

master
Aevann1 2021-09-16 21:06:30 +00:00
parent 15d67f266d
commit fd4c3dccc9
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ GIPHY_KEY = environ.get('GIPHY_KEY').rstrip()
@app.route("/giphy", methods=["GET"]) @app.route("/giphy", methods=["GET"])
@app.route("/giphy<path>", methods=["GET"]) @app.route("/giphy<path>", methods=["GET"])
def giphy(): def giphy(path=None):
searchTerm = request.args.get("searchTerm", "") searchTerm = request.args.get("searchTerm", "")
limit = int(request.args.get("limit", 48)) 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" url = f"https://api.giphy.com/v1/gifs/search?q={searchTerm}&api_key={GIPHY_KEY}&limit=48"
else: else:
url = f"https://api.giphy.com/v1/gifs?api_key={GIPHY_KEY}&limit=48" 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())

View File

@ -134,7 +134,7 @@ def transfer_coins(v, username):
g.db.commit() g.db.commit()
transfer_message = f"🤑 [@{v.username}]({v.url}) has gifted you {amount} {app.config['COINS_NAME']}!" 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"{amount} {app.config['COINS_NAME']} transferred!"}, 200
return {"message": f"{app.config['COINS_NAME']} transferred!"} return {"message": f"{app.config['COINS_NAME']} transferred!"}