mirror of
https://github.com/wangdage12/Snap.Server.git
synced 2026-02-17 08:52:10 +08:00
12 lines
285 B
Python
12 lines
285 B
Python
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
|