Created
October 23, 2020 07:14
-
-
Save TheLittleNaruto/97a7d1a4ee9b562fdf255f7603aff280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@year_api_blueprint.route('/all') | |
@app.app_context() | |
@cache.cached(timeout=500, key_prefix="years") | |
# @requires_login - this need to be public | |
def get_all_years(): | |
data = Database.find("years", {}) | |
if data is not None: | |
return jsonify([year for year in data]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment