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

Api refactor #14

Merged
merged 11 commits into from
Feb 7, 2024
Merged

Api refactor #14

merged 11 commits into from
Feb 7, 2024

Conversation

m30m
Copy link
Collaborator

@m30m m30m commented Feb 6, 2024

  • v1 prefix for all paths
  • Use rest style paths
  • Make all endpoints return json
  • Better internal naming of structures
  • Add versioning to opportunity params

Copy link

@jayantk jayantk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇 I left a couple naming nitpicks

"/v1/liquidation/submit_opportunity",
post(liquidation::submit_opportunity),
"/v1/liquidation/opportunity",
post(liquidation::post_opportunity),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this creates a new opportunity? If so, I think it should be a POST to /v1/liquidation/opportunities to match the usual REST conventions.

)
.route("/v1/liquidation/bid", post(liquidation::post_bid))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be POST /v1/liquidation/opportunities/<opportunity uuid>/bids

"/liquidation/submit_opportunity",
post(marketplace::submit_opportunity),
)
.route("/v1/bid", post(bid::bid))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be /v1/bids

@@ -1,12 +1,7 @@
LIQUIDATION_SERVER_ENDPOINT = "http://localhost:9000"
LIQUIDATION_SERVER_ENDPOINT = "http://localhost:9000/v1"
AUCTION_SERVER_ENDPOINT = "http://localhost:9000/bid"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we don't use this anymore?

@m30m m30m merged commit 57de360 into main Feb 7, 2024
1 check passed
@m30m m30m deleted the api-refactor branch February 7, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants