Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Conversation

Nazarii-4chain
Copy link
Contributor

Changed method to GET

Pull Request Checklist

  • πŸ“– I created my PR using provided : CODE_STANDARDS
  • πŸ“– I have read the short Code of Conduct: CODE_OF_CONDUCT
  • 🏠 I tested my changes locally.
  • βœ… I have provided tests for my changes.
  • πŸ“ I have used conventional commits.
  • πŸ“— I have updated any related documentation.
  • πŸ’Ύ PR was issued based on the Github or Jira issue.

@Nazarii-4chain Nazarii-4chain self-assigned this Jan 29, 2024
@Nazarii-4chain Nazarii-4chain requested a review from a team as a code owner January 29, 2024 09:51
@mergify mergify bot added the feature Any new significant addition label Jan 29, 2024
Copy link
Contributor

mergify bot commented Jan 29, 2024

Welcome to our open-source project @Nazarii-4chain! πŸ’˜

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (d2fa984) 39.54% compared to head (e03c769) 39.54%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #428   +/-   ##
=======================================
  Coverage   39.54%   39.54%           
=======================================
  Files          47       47           
  Lines        1702     1702           
=======================================
  Hits          673      673           
  Misses        989      989           
  Partials       40       40           
Flag Coverage Ξ”
unittests 39.54% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update d2fa984...e03c769. Read the comment docs.

@@ -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)))
Copy link
Contributor

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.

@dorzepowski dorzepowski deleted the feat/BUX-495/AdminGetXPubs branch August 5, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Any new significant addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants