forked from MarseyWorld/MarseyWorld
reorder routes
parent
6730d7b2d8
commit
36c68bb869
|
@ -42,6 +42,11 @@ def reddit_post(subreddit, v, path):
|
|||
return redirect(f'https://{reddit}/{post_id}')
|
||||
|
||||
|
||||
@app.get("/marseys")
|
||||
@app.get("/emojis")
|
||||
def marseys_redirect():
|
||||
return redirect("/emojis/Marsey")
|
||||
|
||||
@cache.cached(make_cache_key=lambda kind, nsfw:f"emoji_list_{kind}_{nsfw}")
|
||||
def get_emoji_list(kind, nsfw):
|
||||
li = g.db.query(Emoji, User).join(User, Emoji.author_id == User.id).filter(Emoji.submitter_id == None, Emoji.kind == kind)
|
||||
|
@ -55,11 +60,6 @@ def get_emoji_list(kind, nsfw):
|
|||
emojis.append(emoji)
|
||||
return emojis
|
||||
|
||||
@app.get("/marseys")
|
||||
@app.get("/emojis")
|
||||
def marseys_redirect():
|
||||
return redirect("/emojis/Marsey")
|
||||
|
||||
@app.get("/emojis/<kind>")
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
|
|
Loading…
Reference in New Issue