MCPcopy Create free account
hub / github.com/TalkingData/owl / getUserProfile

Function getUserProfile

api/users.go:114–124  ·  view source on GitHub ↗

* 1. 获取用户token 2. */

(c *gin.Context)

Source from the content-addressed store, hash-verified

112*/
113
114func getUserProfile(c *gin.Context) {
115 response := gin.H{"code": http.StatusOK}
116 defer c.JSON(http.StatusOK, response)
117 var user *User
118 if user = mydb.getUserProfile(c.GetString("username")); user == nil {
119 response["code"] = http.StatusBadRequest
120 response["message"] = "user not found"
121 return
122 }
123 response["result"] = user
124}
125
126func createUser(c *gin.Context) {
127 response := gin.H{"code": http.StatusOK}

Callers

nothing calls this directly

Calls 1

getUserProfileMethod · 0.80

Tested by

no test coverage detected