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

User Entity and CRUD APIs #19

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

Guzbyte-tech
Copy link
Contributor

@Guzbyte-tech Guzbyte-tech commented Dec 15, 2024

🚀 StarShop Pull Request

  • [] Closes #
  • [] Added tests (if necessary)
  • [] Run tests
  • [] Run formatting
  • [] Evidence attached
  • [] Commented the code

📝 Changes description

  • Created the User entity for the users table using TypeORM, defining all fields as per the requirements.
  • Developed fully functional CRUD operations for the users table:
  • Create: Add a new user with validation for unique wallet addresses and role constraints.
  • Read: Retrieve single or multiple user records.
  • Update: Modify user details, ensuring role constraints and input validation.
  • Delete: Safely remove user records by ID.
  • Integrated DTOs for strong typing and payload validation in the API.
  • Added validation middleware to ensure API payload integrity and handle input errors.
  • Set up migration files for creating and managing the users table schema.

User Routes

Create User: POST /users/create

Get All User: GET /users/show/:id

Read User: GET /users/show/:id

Update User: PUT /users/update/:id

Delete User: DELETE /users/delete/:id


📸 Evidence (A photo is required as evidence)

Screenshot 2024-12-15 at 18 30 25

⏰ Time spent breakdown


🌌 Comments


Thank you for contributing to StarShop, we are glad that you have chosen us as your project of choice and we hope that you continue to contribute to this great project, so that together we can make our mark at the top!

Copy link
Member

@Villarley Villarley left a comment

Choose a reason for hiding this comment

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

lgtm great work!

@Villarley Villarley merged commit e77b03a into StarShopCr:main Dec 17, 2024
1 check passed
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.

2 participants