remove unnecessary ruqqus holdover

pull/83/head
Aevann 2022-12-29 12:42:08 +02:00
parent 909e3f5f29
commit 56b80d447d
4 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
from files.helpers.config.const import FEATURES
# import flask then...
from flask import g, request, render_template, make_response, redirect, jsonify, send_file
from flask import g, request, render_template, make_response, redirect, send_file
# import our app then...
from files.__main__ import app

View File

@ -22,4 +22,4 @@ def giphy(v=None, path=None):
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, timeout=5).json())
return requests.get(url, timeout=5).json()

View File

@ -1,4 +1,4 @@
from flask import g, jsonify, render_template
from flask import g, render_template
from files.helpers.get import get_accounts_dict
from files.routes.wrappers import auth_required
@ -82,7 +82,7 @@ def _special_leaderboard_get():
@auth_required
def get_leaderboard(v):
result = _special_leaderboard_get()
if g.is_api_or_xhr: return jsonify(result)
if g.is_api_or_xhr: return result
users = get_accounts_dict([r[0] for r in result],
v=v, include_shadowbanned=False, graceful=True)
return render_template("special/worldcup22_leaderboard.html",

View File

@ -55,7 +55,7 @@ def marseys(v:User):
@app.get("/emojis")
def emoji_list():
return jsonify(get_emojis(g.db))
return get_emojis(g.db)
@cache.cached(timeout=86400, key_prefix=MARSEYS_CACHE_KEY)
def get_marseys(db:scoped_session):