Skip to content

Commit 1abe0cf

Browse files
authored
docs: fix /audit & /insights params (#12043)
1 parent 1cf4b62 commit 1abe0cf

File tree

6 files changed

+133
-8
lines changed

6 files changed

+133
-8
lines changed

coderd/apidoc/docs.go

+50-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+50-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/audit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
// @Produce json
3232
// @Tags Audit
3333
// @Param q query string false "Search query"
34-
// @Param limit query int false "Page limit"
34+
// @Param limit query int true "Page limit"
3535
// @Param offset query int false "Page offset"
3636
// @Success 200 {object} codersdk.AuditLogResponse
3737
// @Router /audit [get]

coderd/insights.go

+6
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ func (api *API) deploymentDAUs(rw http.ResponseWriter, r *http.Request) {
6464
// @Security CoderSessionToken
6565
// @Produce json
6666
// @Tags Insights
67+
// @Param before query int true "Start time"
68+
// @Param after query int true "End time"
6769
// @Success 200 {object} codersdk.UserActivityInsightsResponse
6870
// @Router /insights/user-activity [get]
6971
func (api *API) insightsUserActivity(rw http.ResponseWriter, r *http.Request) {
@@ -151,6 +153,8 @@ func (api *API) insightsUserActivity(rw http.ResponseWriter, r *http.Request) {
151153
// @Security CoderSessionToken
152154
// @Produce json
153155
// @Tags Insights
156+
// @Param before query int true "Start time"
157+
// @Param after query int true "End time"
154158
// @Success 200 {object} codersdk.UserLatencyInsightsResponse
155159
// @Router /insights/user-latency [get]
156160
func (api *API) insightsUserLatency(rw http.ResponseWriter, r *http.Request) {
@@ -241,6 +245,8 @@ func (api *API) insightsUserLatency(rw http.ResponseWriter, r *http.Request) {
241245
// @Security CoderSessionToken
242246
// @Produce json
243247
// @Tags Insights
248+
// @Param before query int true "Start time"
249+
// @Param after query int true "End time"
244250
// @Success 200 {object} codersdk.TemplateInsightsResponse
245251
// @Router /insights/templates [get]
246252
func (api *API) insightsTemplates(rw http.ResponseWriter, r *http.Request) {

docs/api/audit.md

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/insights.md

+24-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)