You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently registering REST endpoints and CLI commands is highly individual. A developer would create a REST hanler and a CLI handler that parse their own data and apply them to some logic. This produces a lot of duplicate code.
We discussed, that it would make sense to to have one standardized way/method to register endpoints. This method would in one go register REST, CLI and sockets.
But we also said, that this would again be a big refactor and we will probably be doing this after launch.
We have, since this issue was opened, standardized the endpoints a bit on our modules. We have also moved to using queriers to standardize database queries and used those functions to feed both the lite-client and the gaiacli. I think we can close this issue in favor of #1081 (the remaining work here)
I was speaking more of something like have one function: RegisterCmd('GET' 'keys', handler) that would setup a cli cmd gaiacli keys that outputs data and sets up a REST route GET /keys that returns data. This would make working with the SDK as an SDK a lot easier I guess.
Currently registering REST endpoints and CLI commands is highly individual. A developer would create a REST hanler and a CLI handler that parse their own data and apply them to some logic. This produces a lot of duplicate code.
We discussed, that it would make sense to to have one standardized way/method to register endpoints. This method would in one go register REST, CLI and sockets.
But we also said, that this would again be a big refactor and we will probably be doing this after launch.
Pulling in @rigelrozanski @mappum @jaekwon @gamarin2
The text was updated successfully, but these errors were encountered: