MCPcopy Index your code
hub / github.com/gotify/server / GetClients

Method GetClients

api/client.go:179–186  ·  view source on GitHub ↗

GetClients returns all clients a user has. swagger:operation GET /client client getClients Return all clients. --- consumes: [application/json] produces: [application/json] security: [clientTokenAuthorizationHeader: [], clientTokenHeader: [], clientTokenQuery: [], basicAuth: []] responses:

(ctx *gin.Context)

Source from the content-addressed store, hash-verified

177// schema:
178// $ref: "#/definitions/Error"
179func (a *ClientAPI) GetClients(ctx *gin.Context) {
180 userID := auth.GetUserID(ctx)
181 clients, err := a.DB.GetClientsByUser(userID)
182 if success := successOrAbort(ctx, 500, err); !success {
183 return
184 }
185 ctx.JSON(200, clients)
186}
187
188// DeleteClient deletes a client by its id.
189// swagger:operation DELETE /client/{id} client deleteClient

Callers 1

Test_GetClientsMethod · 0.80

Calls 3

GetUserIDFunction · 0.92
successOrAbortFunction · 0.85
GetClientsByUserMethod · 0.65

Tested by 1

Test_GetClientsMethod · 0.64