def get(self): """List services""" page, per_page = pagination.pages() services = Service.objects().paginate(page, per_page) paging = pagination.Pagination(services) return services.items, 200, paging.headers
def get(self): """List clusters""" page, per_page = pagination.pages() clusters = Cluster.objects( roles__in=current_identity.roles ).paginate(page, per_page) paging = pagination.Pagination(clusters) return clusters.items, 200, paging.headers