MCPcopy
hub / github.com/xpzouying/xiaohongshu-mcp / respondSuccess

Function respondSuccess

handlers_api.go:28–39  ·  view source on GitHub ↗

respondSuccess 返回成功响应

(c *gin.Context, data any, message string)

Source from the content-addressed store, hash-verified

26
27// respondSuccess 返回成功响应
28func 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 检查登录状态
42func (s *AppServer) checkLoginStatusHandler(c *gin.Context) {

Callers 13

getLoginQrcodeHandlerMethod · 0.85
deleteCookiesHandlerMethod · 0.85
publishHandlerMethod · 0.85
publishVideoHandlerMethod · 0.85
listFeedsHandlerMethod · 0.85
searchFeedsHandlerMethod · 0.85
getFeedDetailHandlerMethod · 0.85
userProfileHandlerMethod · 0.85
postCommentHandlerMethod · 0.85
replyCommentHandlerMethod · 0.85
healthHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected