respondSuccess 返回成功响应
(c *gin.Context, data any, message string)
| 26 | |
| 27 | // respondSuccess 返回成功响应 |
| 28 | func respondSuccess(c *gin.Context, data any, message string) { |
| 29 | response := SuccessResponse{ |
| 30 | Success: true, |
| 31 | Data: data, |
| 32 | Message: message, |
| 33 | } |
| 34 | |
| 35 | logrus.Infof("%s %s %s %d", c.Request.Method, c.Request.URL.Path, |
| 36 | c.GetString("account"), http.StatusOK) |
| 37 | |
| 38 | c.JSON(http.StatusOK, response) |
| 39 | } |
| 40 | |
| 41 | // checkLoginStatusHandler 检查登录状态 |
| 42 | func (s *AppServer) checkLoginStatusHandler(c *gin.Context) { |
no outgoing calls
no test coverage detected