Skip to content

Commit 81f9a2b

Browse files
committed
fix(user): changes in password field name, remove unused interface
1 parent 254b261 commit 81f9a2b

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

docs/openapi.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,10 @@
496496
}
497497
},
498498
"UpdateUserPasswordRequest": {
499-
"required": ["newPassword"],
499+
"required": ["password"],
500500
"type": "object",
501501
"properties": {
502-
"newPassword": {
502+
"password": {
503503
"type": "string"
504504
}
505505
}

interfaces/servicecontainer.go

-7
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,10 @@ func (k *kernel) userCommandServiceContainer() *userService.UserCommandService {
9494
MySQLDBHandlerInterface: mysqlDBHandler,
9595
}
9696

97-
queryRepository := &userRepository.UserQueryRepository{
98-
MySQLDBHandlerInterface: mysqlDBHandler,
99-
}
100-
10197
service := &userService.UserCommandService{
10298
UserCommandRepositoryInterface: &userRepository.UserCommandRepositoryCircuitBreaker{
10399
UserCommandRepositoryInterface: repository,
104100
},
105-
UserQueryRepositoryInterface: &userRepository.UserQueryRepositoryCircuitBreaker{
106-
UserQueryRepositoryInterface: queryRepository,
107-
},
108101
}
109102

110103
return service

module/user/infrastructure/service/UserCommandService.go

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
// UserCommandService handles the user command service logic
2222
type UserCommandService struct {
2323
repository.UserCommandRepositoryInterface
24-
repository.UserQueryRepositoryInterface
2524
}
2625

2726
// CreateUser create a user

module/user/interfaces/http/dto.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type UpdateUserEmailVerifiedAtRequest struct {
3131
}
3232

3333
type UpdateUserPasswordRequest struct {
34-
NewPassword string `json:"newPassword" validate:"required"`
34+
Password string `json:"password" validate:"required"`
3535
}
3636

3737
type CreateUserResponse struct {

module/user/interfaces/http/rest/UserCommandController.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func (controller *UserCommandController) UpdateUserPassword(w http.ResponseWrite
338338

339339
err = controller.UserCommandServiceInterface.UpdateUserPassword(context.TODO(), serviceTypes.UpdateUserPassword{
340340
WalletAddress: walletAddress,
341-
NewPassword: request.NewPassword,
341+
NewPassword: request.Password,
342342
})
343343
if err != nil {
344344
var httpCode int

0 commit comments

Comments
 (0)