nelson.cli
nelson.cli copied to clipboard
Add paging mechanism to /peer api endpoint
Expected behaviour
when calling the Endpoint there should be a metadatalist which contains the following information: totalPeers: numberOfPeers: offset: data:
the totalPeers are the total number of peers in the peer.list numberOfPeers are the number of peers contained in the data object offset: how many peers are skipped. data: the actual peer objects
This would need a sorting at some point, i suggest data._id from the peer as a sorting indicator.
Actual behaviour
you get all the peers at once
Steps to reproduce
make a call to /peers
I would consider adding a full express app as api endpoint. More flexibility in the future. Also regarding the versioning.