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

Feat/services controllers #4

Merged
merged 13 commits into from
Oct 30, 2024
Merged

Conversation

danifromecuador
Copy link
Owner

@danifromecuador danifromecuador commented Oct 30, 2024

In this PR, I've:

  • Created a feat/services-controllers branch
  • Installed Faraday gem to perform HTTP requests
  • Created CoinDeskService to fetch current BTC/USD exchange rate that fetches that data from CoinDesk API
  • Created routes and controllers for User and Transaction entities
  • Created the following endpoints for the User entity
    • GET /users shows all the users
    • GET /users/1 shows details of the given user
    • POST /users creates a new user
    • PATCH/PUT /users/1 edit or update the balance of the given user when a transaction is done
  • Created the following endpoints for the Transaction entity
    • GET /users/1/transactions shows all the transactions of a given user
    • GET /users/1/transactions/1 shows details of the given transaction for the given user
    • POST /users/1/transactions creates a new transaction for the given user
  • Update the User balance when a transaction is done
  • Fix Rubocop linter errors

@danifromecuador danifromecuador merged commit 5661f2a into develop Oct 30, 2024
2 checks passed
@danifromecuador danifromecuador deleted the feat/services-controllers branch October 30, 2024 18:53
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.

1 participant