The announcement API controls the popup modal shown to visitors on the HNU-TimeLetter frontend. The popup renders a Feishu document (飞书文档) by URL, along with any feature extension configuration. Two endpoints serve this data: an admin endpoint for reading and writing the configuration, and a public endpoint that the frontend popup component calls at runtime.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HNU-himematsu/HNU-TimeLetter/llms.txt
Use this file to discover all available pages before exploring further.
Two-endpoint pattern:
GET /api/admin/announcement is protected by the admin_auth cookie and is used for management. GET /api/announcement-config is publicly accessible and is called by the frontend popup component. Both return the same response shape. This separation keeps write access behind authentication while allowing the frontend to read the configuration without credentials.GET /api/admin/announcement
Returns the current announcement configuration. Authentication:admin_auth cookie required. Returns 401 Unauthorized if absent or invalid.
Response fields
The Feishu document URL rendered inside the announcement popup (e.g.
"https://himematsu.feishu.cn/docx/EbsDdehuLo1801xBzb1cxzJLnHb").Feature extension configuration for the announcement popup.
Example response
curl example
PATCH /api/admin/announcement
Updates the announcement configuration. All fields are optional — only include the fields you want to change. Returns the full updated configuration on success. Authentication:admin_auth cookie required.
Request body
The new Feishu document URL for the announcement popup. Must be a non-empty string when provided — passing an empty string is rejected with
400 Bad Request.Replacement feature extension configuration. Must be a JSON object when provided. The entire
featureConfig value is replaced, not merged.Responses
200 OK — Returns the full updated announcement configuration (same shape as GET /api/admin/announcement).
400 Bad Request — docUrl was provided as an empty string.
401 Unauthorized — Missing or invalid admin_auth cookie.
curl example
GET /api/announcement-config
Public endpoint — no authentication required. Returns the same response shape asGET /api/admin/announcement. This is the endpoint the frontend popup component calls each time it opens.