improve: use react-query for caching

This commit is contained in:
h z
2024-12-08 17:11:14 +00:00
parent 7416294437
commit 072ae25f7c

View File

@@ -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