cmd/pkgserver: remove get endpoint count field
This commit is contained in:
@@ -103,7 +103,6 @@ func (index *packageIndex) handleGet(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
values := index.sorts[sort][i:min(i+limit, len(index.sorts[sort]))]
|
values := index.sorts[sort][i:min(i+limit, len(index.sorts[sort]))]
|
||||||
// TODO(mae): remove count field
|
|
||||||
writeAPIPayload(w, &struct {
|
writeAPIPayload(w, &struct {
|
||||||
Values []*metadata `json:"values"`
|
Values []*metadata `json:"values"`
|
||||||
}{values})
|
}{values})
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ async function infoRequest(): Promise<InfoPayload> {
|
|||||||
return payload as InfoPayload
|
return payload as InfoPayload
|
||||||
}
|
}
|
||||||
class GetPayload {
|
class GetPayload {
|
||||||
count: number
|
|
||||||
values: PackageIndexEntry[]
|
values: PackageIndexEntry[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,7 +107,7 @@ class State {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
let table = document.getElementById("pkg-list")
|
let table = document.getElementById("pkg-list")
|
||||||
table.innerHTML = ''
|
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]))
|
table.appendChild(toHTML(res.values[i]))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user