MCPcopy
hub / github.com/gotify/server / GetUsers

Method GetUsers

api/user.go:90–101  ·  view source on GitHub ↗

GetUsers returns all the users swagger:operation GET /user user getUsers Return all users. --- produces: [application/json] security: [clientTokenAuthorizationHeader: [], clientTokenHeader: [], clientTokenQuery: [], basicAuth: []] responses: 200: description: Ok schema: typ

(ctx *gin.Context)

Source from the content-addressed store, hash-verified

88// schema:
89// $ref: "#/definitions/Error"
90func (a *UserAPI) GetUsers(ctx *gin.Context) {
91 users, err := a.DB.GetUsers()
92 if success := successOrAbort(ctx, 500, err); !success {
93 return
94 }
95 var resp []*model.UserExternal
96 for _, user := range users {
97 resp = append(resp, toExternalUser(user))
98 }
99
100 ctx.JSON(200, resp)
101}
102
103// GetCurrentUser returns the current user
104// swagger:operation GET /current/user user currentUser

Callers

nothing calls this directly

Calls 3

successOrAbortFunction · 0.85
toExternalUserFunction · 0.85
GetUsersMethod · 0.65

Tested by

no test coverage detected