实现投稿ui

This commit is contained in:
2026-01-23 11:16:07 +08:00
parent 2bb3db5966
commit 5932adcd9a
8 changed files with 839 additions and 16 deletions

View File

@@ -293,6 +293,28 @@ def downvote():
except Exception as e:
return jsonify({"code": 2003, "data": f"点踩失败: {str(e)}"})
@app.route('/api/test', methods=['GET'])
def test_api():
return jsonify({"code": 1000, "data": ""})
@app.route('/api/statics', methods=['GET'])
def get_statics():
try:
post_count = Submission.query.count()
comment_count = Comment.query.count()
# TODO目前暂未实现图片上传逻辑先返回114514
image_count = 114514
return jsonify({
"code": 1000,
"data": {
"posts": post_count,
"comments": comment_count,
"images": image_count
}
})
except Exception as e:
return jsonify({"code": 2003, "data": str(e)})
# --- 用户的管理api端点 ---
# TODO: 用户管理端点