as: Add official announcements
Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
@@ -1021,6 +1021,17 @@ func AsRouter(r *gin.Engine) {
|
||||
|
||||
resp := SignResp(ctx.GetString("ep"), userCardResp, sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
s.POST("/notice/fetchNoticeDetail", func(ctx *gin.Context) {
|
||||
reqBody := gjson.Parse(ctx.GetString("reqBody")).Array()[0]
|
||||
// fmt.Println(reqBody.String())
|
||||
|
||||
noticeId := reqBody.Get("notice_id").String()
|
||||
|
||||
resp := SignResp(ctx.GetString("ep"), utils.ReadAllText("assets/as/notices/"+noticeId+".json"), sessionKey)
|
||||
|
||||
ctx.Header("Content-Type", "application/json")
|
||||
ctx.String(http.StatusOK, resp)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user