File tree 5 files changed +7
-8
lines changed
5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ func (repository *UserCommandRepository) UpdateUserEmailVerifiedAt(email string)
84
84
func (repository * UserCommandRepository ) UpdateUserPassword (data repositoryTypes.UpdateUserPassword ) error {
85
85
user := & entity.User {
86
86
WalletAddress : data .WalletAddress ,
87
- Password : data .NewPassword ,
87
+ Password : data .Password ,
88
88
}
89
89
90
90
// update users
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ type UpdateUser struct {
15
15
}
16
16
17
17
type UpdateUserPassword struct {
18
- WalletAddress string
19
- CurrentPassword string
20
- NewPassword string
18
+ WalletAddress string
19
+ Password string
21
20
}
Original file line number Diff line number Diff line change @@ -136,14 +136,14 @@ func (service *UserCommandService) UpdateUserEmailVerifiedAt(ctx context.Context
136
136
137
137
// UpdateUserPassword update user password by address
138
138
func (service * UserCommandService ) UpdateUserPassword (ctx context.Context , data types.UpdateUserPassword ) error {
139
- hashedPassword , err := password .HashPassword (data .NewPassword )
139
+ hashedPassword , err := password .HashPassword (data .Password )
140
140
if err != nil {
141
141
return err
142
142
}
143
143
144
144
err = service .UserCommandRepositoryInterface .UpdateUserPassword (repositoryTypes.UpdateUserPassword {
145
145
WalletAddress : data .WalletAddress ,
146
- NewPassword : hashedPassword ,
146
+ Password : hashedPassword ,
147
147
})
148
148
if err != nil {
149
149
return err
Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ type UpdateUser struct {
19
19
20
20
type UpdateUserPassword struct {
21
21
WalletAddress string
22
- NewPassword string
22
+ Password string
23
23
}
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ func (controller *UserCommandController) UpdateUserPassword(w http.ResponseWrite
338
338
339
339
err = controller .UserCommandServiceInterface .UpdateUserPassword (context .TODO (), serviceTypes.UpdateUserPassword {
340
340
WalletAddress : walletAddress ,
341
- NewPassword : request .Password ,
341
+ Password : request .Password ,
342
342
})
343
343
if err != nil {
344
344
var httpCode int
You can’t perform that action at this time.
0 commit comments