Closed jamestoyer closed 5 years ago
Hey @dillon-giacoppo is it possible to get a review on this?
Hi @jamestoyer sorry for the delay, getting time roadmapped to improve the OSS projects is not always easy. I'll endeavour to give it a thorough review by weeks end.
The
GET /api/replications/<repo-key>
endpoint can return both a single object or an array of objects. The current implementation can only handle arrays which makes it problematic when you use pull replication or only have one replication set up.In order to do this, the HTTP body needs to be buffered and then copied to a new buffer. This prevents weird EOF errors from preventing type checking. The body is then marshalled into an interface to determine if it's an array or not, and then properly marshalled in to the correct type