KGG-Dev-Course / taskmaster-api

Task management API
15 stars 7 forks source link

Implement Profile Table and Endpoints for Users in ASP.Net Web API Project #19

Closed johnsmith0305 closed 11 months ago

johnsmith0305 commented 11 months ago

Discussed in https://github.com/chenxidev1129/taskmaster-api/discussions/18

Originally posted by **johnsmith0305** December 22, 2023 ### Objective: To enhance the user management system by implementing a profile table and relevant endpoints in the ASP.Net Web API project. This enhancement will allow users to store additional information beyond the basic user details provided by the IdentityUser. ### Details: Profile Table: - **UserId** String (FK) - **FirstName** String - **LastName** String - **AboutMe** String - **Gender** Bit - **DateOfBirth** String - **PhoneNumber** String - **Photo** String Endpoints: 1. **Create Profile:** - Endpoint: **'/api/Profile'** - Method: POST - Description: Allows users to create their profile by providing necessary details like first name, last name, email, phone number, etc. 2. **Get Profile by User ID:** - Endpoint: **'/api/Profile/{userId}'** - Method: GET - Description: Fetches the profile information for a specific user based on their ID. 3. **Update Profile** - Endpoint: **'/api/Profile/{uesrId}'** - Method: PUT - Description: Allows users to update their profile information with new details. 4. **Delete Profile** - Endpoint: **/api/Profile/{id}'** - Method: DELETE - Description: Allows user to delete their profile permanently. ### Additional Considerations: - Ensure proper validation for data input. - Implement authentication and authorization mechanisms for profile-related endpoints. - Document API endpoints using Swagger or similar tools for ease of understanding and usage. (automatic) - Write unit tests to ensure the functionality and security of profile-related operations. (optional) ### Implementation Plan: 1. Define the structure of the UserProfile table and its relationship with IdentityUser. 2. Implement CRUD operations for profile management. 3. Integrate authentication and authorization mechanisms for profile endpoints. 4. Write unit tests to validate the functionality. (optional) 5. Document API endpoints using Swagger. (automatic)
smartwebdev2023 commented 11 months ago

@johnsmith0305 I pushed my commit that created profile table

johnsmith0305 commented 11 months ago

@johnsmith0305 I pushed my commit that created profile table

Please check this @chenxidev1129