UMAprotocol / protocol

UMA Protocol Running on Ethereum
https://uma.xyz
GNU Affero General Public License v3.0
361 stars 175 forks source link

feat(api): add GET routes that mirror POST routes in express #4661

Closed daywiss closed 8 months ago

daywiss commented 8 months ago

Motivation

we want to add some kind of health check to the bots to make sure our connection to datastore is working. this can be done as long as we have a way to query routes through "GET". currently these actions require a POST.

Summary This does not break any existing functionality, only mirrorss the POST calls to GET calls using the exact same underlying logic

for health checks, you can now hit GET global/listActive

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

linear[bot] commented 8 months ago
UMA-1912 Still seeing uma api listActive errors

[https://risklabs.slack.com/archives/C023WBEPBMH/p1698243105899259](https://risklabs.slack.com/archives/C023WBEPBMH/p1698243105899259) may want to implement what matt suggested [https://risklabs.slack.com/archives/C023WBEPBMH/p1697655748029759?thread_ts=1697116884.447749&cid=C023WBEPBMH](https://risklabs.slack.com/archives/C023WBEPBMH/p1697655748029759?thread_ts=1697116884.447749&cid=C023WBEPBMH) Evaldo and I were talking about this issue — how hard do you think it would be to add a GET that would trigger the listActive functionality? That way GCP could send this health check and auto restart the instance whenever that call fails.