riverqueue / riverui

A web interface for River, fast and reliable background jobs in Go.
https://ui.riverqueue.com/
Mozilla Public License 2.0
43 stars 3 forks source link

Convert all queue endpoints + more tests + list response #77

Closed brandur closed 3 days ago

brandur commented 3 days ago

Continue API endpoint conversion work by converting all queue endpoints to the new system and add requisite tests for all of them.

Another thing I added here is a generic listResponse so that list endpoints start returning top level objects instead of raw arrays. This is more compatible with the API endpoint framework for one, but from an API design standpoint it's better because it's more forward compatible. In case you ever want to add a new field to a list response, you don't have any flexibility on a raw array because there's nowhere to put anything new, but with a top-level object, you can add new keys to it.

brandur commented 3 days ago

@bgentry I was going to try and get all of the rest of them in one go, but I ended up having to add so much new supporting stuff that even just converting queues turned into a massive change, so I'm going to do the rest in two parts: queues, then everything else. Mind taking a look?

brandur commented 3 days ago

Thanks!