diff --git a/cmd/pkgserver/api.go b/cmd/pkgserver/api.go index afa37c2..914479c 100644 --- a/cmd/pkgserver/api.go +++ b/cmd/pkgserver/api.go @@ -103,7 +103,6 @@ func (index *packageIndex) handleGet(w http.ResponseWriter, r *http.Request) { return } values := index.sorts[sort][i:min(i+limit, len(index.sorts[sort]))] - // TODO(mae): remove count field writeAPIPayload(w, &struct { Values []*metadata `json:"values"` }{values}) diff --git a/cmd/pkgserver/ui/static/index.ts b/cmd/pkgserver/ui/static/index.ts index 453964f..842920a 100644 --- a/cmd/pkgserver/ui/static/index.ts +++ b/cmd/pkgserver/ui/static/index.ts @@ -45,7 +45,6 @@ async function infoRequest(): Promise { return payload as InfoPayload } class GetPayload { - count: number values: PackageIndexEntry[] } @@ -108,7 +107,7 @@ class State { .then(res => { let table = document.getElementById("pkg-list") table.innerHTML = '' - for(let i = 0; i < res.count; i++) { + for(let i = 0; i < res.values.length; i++) { table.appendChild(toHTML(res.values[i])) } })