Skip to content

Commit

Permalink
variable name change to maintain consistency
Browse files Browse the repository at this point in the history
Signed-off-by: Rajshekar Chavakula <rchavakula.ctr@sumologic.com>
  • Loading branch information
chavakula committed Mar 1, 2024
1 parent d63e7af commit 0ad2ebe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/apid/routers/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (r *UsersRouter) changePasswordFromWeb(req *http.Request) (interface{}, err
if err != nil {
return nil, err
}
newPassword := params["newPassword"]
newPassword := params["password_new"]
oldPassword := params["password"]

user, err := r.controller.AuthenticateUser(req.Context(), username, oldPassword)
Expand Down
2 changes: 1 addition & 1 deletion backend/apid/routers/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func TestUsersRouter(t *testing.T) {
name: "update password from web ui",
method: http.MethodPut,
path: path.Join(fixture.URIPath(), "change_password"),
body: []byte(`{"username":"foo","password":"admin123","newPassword":"admin123"}`),
body: []byte(`{"username":"foo","password":"admin123","password_new":"admin123"}`),
controllerFunc: func(c *mockUserController) {
c.On("AuthenticateUser", mock.Anything, mock.Anything, mock.Anything).
Return(&corev2.User{Username: "foo", Password: "admin123", PasswordHash: "admin123_hash"}, nil).
Expand Down

0 comments on commit 0ad2ebe

Please sign in to comment.