add collection endpoint impl

This commit is contained in:
2025-02-05 03:17:23 +01:00
parent 8421f02027
commit 905b488fd4
2 changed files with 54 additions and 25 deletions

View File

@@ -182,9 +182,9 @@ func (s *Server) collection(w http.ResponseWriter, r *http.Request) {
return
}
//TODO
limit, offset := pagination(r)
recent, err := getCollection(s.Db, index)
recent, err := getCollection(s.Db, limit, offset, index)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return