Skip to content

Commit fbcfa36

Browse files
committed
Use empty page struct
1 parent f501786 commit fbcfa36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/workspaces.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (api *API) workspaceCount(rw http.ResponseWriter, r *http.Request) {
162162
apiKey := httpmw.APIKey(r)
163163

164164
queryStr := r.URL.Query().Get("q")
165-
filter, errs := workspaceSearchQuery(queryStr)
165+
filter, errs := workspaceSearchQuery(queryStr, codersdk.Pagination{})
166166
if len(errs) > 0 {
167167
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
168168
Message: "Invalid audit search query.",
@@ -185,7 +185,7 @@ func (api *API) workspaceCount(rw http.ResponseWriter, r *http.Request) {
185185
return
186186
}
187187

188-
count, err := api.Database.GetWorkspaceCount(ctx, filter, sqlFilter)
188+
count, err := api.Database.GetAuthorizedWorkspaceCount(ctx, filter, sqlFilter)
189189
if err != nil {
190190
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
191191
Message: "Internal error fetching workspace count.",

0 commit comments

Comments
 (0)