mirror of
https://github.com/wangdage12/Snap.Server.git
synced 2026-02-17 08:52:10 +08:00
初始提交
This commit is contained in:
11
services/announcement_service.py
Normal file
11
services/announcement_service.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from app.extensions import client
|
||||
from app.config import Config
|
||||
|
||||
def get_announcements():
|
||||
if Config.ISTEST_MODE:
|
||||
return []
|
||||
|
||||
announcements = list(client.ht_server.announcement.find({}))
|
||||
for a in announcements:
|
||||
a.pop('_id', None)
|
||||
return announcements
|
||||
Reference in New Issue
Block a user