-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUX-495: AdminGetXpubs #428
Conversation
Welcome to our open-source project @Nazarii-4chain! π |
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## master #428 +/- ##
=======================================
Coverage 39.54% 39.54%
=======================================
Files 47 47
Lines 1702 1702
=======================================
Hits 673 673
Misses 989 989
Partials 40 40
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
@@ -39,6 +39,6 @@ func RegisterRoutes(router *apirouter.Router, appConfig *config.AppConfig, servi | |||
router.HTTPRouter.POST("/"+config.APIVersion+"/admin/transactions/record", action.Request(router, require.Wrap(action.transactionRecord))) | |||
router.HTTPRouter.POST("/"+config.APIVersion+"/admin/utxos/search", action.Request(router, require.Wrap(action.utxosSearch))) | |||
router.HTTPRouter.POST("/"+config.APIVersion+"/admin/utxos/count", action.Request(router, require.Wrap(action.utxosCount))) | |||
router.HTTPRouter.POST("/"+config.APIVersion+"/admin/xpubs/search", action.Request(router, require.Wrap(action.xpubsSearch))) | |||
router.HTTPRouter.GET("/"+config.APIVersion+"/admin/xpubs/search", action.Request(router, require.Wrap(action.xpubsSearch))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately currently there isn't HTTP method for "search",
and often POST is better, because it accepts body where you can put much longer "queries" then in url.
Although there is no limitation for URL length in specification, I saw that some network components could reject URL that is to long.
Therefore I'm voting for using POST in each search request and GET if this is get by id (or other single identifier). And if client is not working, it should be changed in a client, not here.
Changed method to GET
Pull Request Checklist