MCPcopy Index your code
hub / github.com/coder/coder / deploymentDAUs

Method deploymentDAUs

coderd/insights.go:37–44  ·  view source on GitHub ↗

@Summary Get deployment DAUs @ID get-deployment-daus @Security CoderSessionToken @Produce json @Tags Insights @Param tz_offset query int true "Time-zone offset (e.g. -2)" @Success 200 {object} codersdk.DAUsResponse @Router /api/v2/insights/daus [get]

(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

35// @Success 200 {object} codersdk.DAUsResponse
36// @Router /api/v2/insights/daus [get]
37func (api *API) deploymentDAUs(rw http.ResponseWriter, r *http.Request) {
38 if !api.Authorize(r, policy.ActionRead, rbac.ResourceDeploymentConfig) {
39 httpapi.Forbidden(rw)
40 return
41 }
42
43 api.returnDAUsInternal(rw, r, nil)
44}
45
46func (api *API) returnDAUsInternal(rw http.ResponseWriter, r *http.Request, templateIDs []uuid.UUID) {
47 ctx := r.Context()

Callers

nothing calls this directly

Calls 3

AuthorizeMethod · 0.95
returnDAUsInternalMethod · 0.95
ForbiddenFunction · 0.92

Tested by

no test coverage detected