MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / GetUser

Function GetUser

server/handles/user.go:102–115  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

100}
101
102func GetUser(c *gin.Context) {
103 idStr := c.Query("id")
104 id, err := strconv.Atoi(idStr)
105 if err != nil {
106 common.ErrorResp(c, err, 400)
107 return
108 }
109 user, err := op.GetUserById(uint(id))
110 if err != nil {
111 common.ErrorResp(c, err, 500, true)
112 return
113 }
114 common.SuccessResp(c, user)
115}
116
117func Cancel2FAById(c *gin.Context) {
118 idStr := c.Query("id")

Callers

nothing calls this directly

Calls 3

ErrorRespFunction · 0.92
GetUserByIdFunction · 0.92
SuccessRespFunction · 0.92

Tested by

no test coverage detected