forked from rDrama/rDrama
remove unnecessary ruqqus holdover
parent
909e3f5f29
commit
56b80d447d
|
@ -2,7 +2,7 @@
|
||||||
from files.helpers.config.const import FEATURES
|
from files.helpers.config.const import FEATURES
|
||||||
|
|
||||||
# import flask then...
|
# 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...
|
# import our app then...
|
||||||
from files.__main__ import app
|
from files.__main__ import app
|
||||||
|
|
|
@ -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"
|
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, timeout=5).json())
|
return requests.get(url, timeout=5).json()
|
||||||
|
|
|
@ -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.helpers.get import get_accounts_dict
|
||||||
|
|
||||||
from files.routes.wrappers import auth_required
|
from files.routes.wrappers import auth_required
|
||||||
|
@ -82,7 +82,7 @@ def _special_leaderboard_get():
|
||||||
@auth_required
|
@auth_required
|
||||||
def get_leaderboard(v):
|
def get_leaderboard(v):
|
||||||
result = _special_leaderboard_get()
|
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],
|
users = get_accounts_dict([r[0] for r in result],
|
||||||
v=v, include_shadowbanned=False, graceful=True)
|
v=v, include_shadowbanned=False, graceful=True)
|
||||||
return render_template("special/worldcup22_leaderboard.html",
|
return render_template("special/worldcup22_leaderboard.html",
|
||||||
|
|
|
@ -55,7 +55,7 @@ def marseys(v:User):
|
||||||
|
|
||||||
@app.get("/emojis")
|
@app.get("/emojis")
|
||||||
def emoji_list():
|
def emoji_list():
|
||||||
return jsonify(get_emojis(g.db))
|
return get_emojis(g.db)
|
||||||
|
|
||||||
@cache.cached(timeout=86400, key_prefix=MARSEYS_CACHE_KEY)
|
@cache.cached(timeout=86400, key_prefix=MARSEYS_CACHE_KEY)
|
||||||
def get_marseys(db:scoped_session):
|
def get_marseys(db:scoped_session):
|
||||||
|
|
Loading…
Reference in New Issue