improve: use react-query for caching
This commit is contained in:
@@ -31,7 +31,7 @@ def get_index(path_id):
|
||||
with get_db() as session:
|
||||
markdown = session.query(Markdown).filter(Markdown.path_id == path_id).filter(Markdown.title == "index").first()
|
||||
if markdown is None:
|
||||
return jsonify({"error": "index not exist"}), 404
|
||||
return jsonify({}), 204
|
||||
return jsonify(markdown.to_dict()), 200
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user