File tree 3 files changed +6
-8
lines changed 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -469,6 +469,7 @@ func New(options *Options) *API {
469
469
apiKeyMiddleware ,
470
470
)
471
471
r .Get ("/" , api .workspaces )
472
+ r .Get ("/count" , api .workspaceCount )
472
473
r .Route ("/{workspace}" , func (r chi.Router ) {
473
474
r .Use (
474
475
httpmw .ExtractWorkspaceParam (options .Database ),
Original file line number Diff line number Diff line change @@ -303,13 +303,10 @@ export const getWorkspacesCount = async (
303
303
if ( options . q ) {
304
304
searchParams . set ( "q" , options . q )
305
305
}
306
- // TODO
307
- // const response = await axios.get(
308
- // `/api/v2/workspaces/count?${searchParams.toString()}`,
309
- // )
310
- // return response.data
311
-
312
- return Promise . resolve ( { count : 10 } )
306
+ const response = await axios . get (
307
+ `/api/v2/workspaces/count?${ searchParams . toString ( ) } ` ,
308
+ )
309
+ return response . data
313
310
}
314
311
315
312
export const getWorkspaceByOwnerAndName = async (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const WorkspacesPage: FC = () => {
17
17
const [ workspacesState , send ] = useMachine ( workspacesMachine , {
18
18
context : {
19
19
page : currentPage ,
20
- limit : 2 , //TODO
20
+ limit : 25 ,
21
21
filter,
22
22
} ,
23
23
actions : {
You can’t perform that action at this time.
0 commit comments