diff --git a/Makefile b/Makefile index 1c30e7070..6c2e69e50 100644 --- a/Makefile +++ b/Makefile @@ -40,12 +40,12 @@ test: # Run the application run: @echo "Running $(BINARY_NAME)..." - @$(GO) run $(MAIN_PATH) + @$(GO) run $(MAIN_PACKAGE)/main.go $(MAIN_PACKAGE)/version.go # Run the application with test environment (using fake service) run-test: @echo "Running $(BINARY_NAME) with test environment..." - @APP_ENV=test $(GO) run $(MAIN_PATH) + @APP_ENV=test $(GO) run $(MAIN_PACKAGE)/main.go $(MAIN_PACKAGE)/version.go # Install dependencies deps: diff --git a/internal/api/handlers/v0/servers.go b/internal/api/handlers/v0/servers.go index 4d597862b..21df67c8f 100644 --- a/internal/api/handlers/v0/servers.go +++ b/internal/api/handlers/v0/servers.go @@ -20,6 +20,8 @@ type PaginatedResponse struct { // Metadata contains pagination metadata type Metadata struct { NextCursor string `json:"next_cursor,omitempty"` + Count int `json:"count,omitempty"` + Total int `json:"total,omitempty"` } // ServersHandler returns a handler for listing registry items @@ -82,6 +84,7 @@ func ServersHandler(registry service.RegistryService) http.HandlerFunc { if nextCursor != "" { response.Metadata = Metadata{ NextCursor: nextCursor, + Count: len(registries), } }