Skip to content

Add address management and user details retrieval functionality#26

Merged
NourAlPha merged 29 commits intodevfrom
fix-bug-in-update
May 15, 2025
Merged

Add address management and user details retrieval functionality#26
NourAlPha merged 29 commits intodevfrom
fix-bug-in-update

Conversation

@NourAlPha
Copy link
Contributor

@NourAlPha NourAlPha commented May 14, 2025

This pull request introduces several enhancements and fixes to the authentication module, including improved validation, new DTOs for user updates and details, and expanded functionality in the User and Address models. The changes also include updates to the pom.xml dependencies and the addition of new service methods and exception handling.

Dependency Updates

  • Updated podzilla-utils-lib dependency to version v1.1.6 in pom.xml.
  • Added spring-boot-starter-validation dependency to enable validation annotations.

Validation Enhancements

  • Added @Valid annotations to request bodies in AuthenticationController methods (login and registerUser) for automatic validation. [1] [2]
  • Introduced validation annotations (@NotBlank, @Email) in LoginRequest and SignupRequest DTOs to enforce field constraints. [1] [2]
  • Implemented handleMethodArgumentNotValid in GlobalExceptionHandler to provide detailed error messages for validation failures.

User and Address Model Enhancements

  • Added mobileNumber and a one-to-one relationship with the Address entity to the User model.
  • Created a new Address entity with fields for street, city, state, country, and postal code, linked to the User model.
  • Added AddressRepository for database operations on the Address entity.

New DTOs and Controller Features

  • Introduced UpdateRequest and UserDetailsRequest DTOs for user profile updates and fetching user details. [1] [2]
  • Enhanced UserController with a new getUserDetails endpoint and updated updateProfile to use UpdateRequest.

Service and Utility Updates

  • Refactored AuthenticationService to include getCurrentUserDetails and updated header methods to include X-User-Id. [1] [2]
  • Updated AdminService to include id in CustomUserDetails.
  • Added validation for unique mobile numbers in registerAccount in AuthenticationService.

@NourAlPha NourAlPha closed this May 14, 2025
@NourAlPha NourAlPha reopened this May 14, 2025
@NourAlPha NourAlPha closed this May 14, 2025
@NourAlPha NourAlPha reopened this May 14, 2025
@NourAlPha NourAlPha changed the title Fix bug in update Add address management and user details retrieval functionality May 14, 2025
@NourAlPha NourAlPha requested a review from a team May 14, 2025 18:06
@NourAlPha NourAlPha self-assigned this May 14, 2025
@NourAlPha NourAlPha merged commit 24b838f into dev May 15, 2025
5 checks 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