mirror of
https://github.com/wangdage12/Snap.Server.git
synced 2026-02-17 08:52:10 +08:00
添加sentry、新增公告筛选功能
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
from flask import Blueprint, jsonify
|
||||
from flask import Blueprint, jsonify, request
|
||||
from services.announcement_service import get_announcements
|
||||
|
||||
announcement_bp = Blueprint("announcement", __name__)
|
||||
|
||||
@announcement_bp.route("/List", methods=["POST"])
|
||||
def list_announcements():
|
||||
# 获取用户已关闭的公告ID列表,也可能没有请求体
|
||||
request_data = request.get_json(silent=True) or []
|
||||
return jsonify({
|
||||
"code": 0,
|
||||
"message": "OK",
|
||||
"data": get_announcements()
|
||||
"data": get_announcements(request_data)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user