Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add reset user password action #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update coderd/database/databasefake/databasefake.go
Co-authored-by: Mathias Fredriksson <[email protected]>
  • Loading branch information
BrunoQuaresma and mafredri authored May 5, 2022
commit 56b29fd821a0afff85b667a38b94c5e3b2fef51c
4 changes: 2 additions & 2 deletions coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1318,12 +1318,12 @@ func (q *fakeQuerier) UpdateUserHashedPassword(_ context.Context, arg database.U
q.mutex.Lock()
defer q.mutex.Unlock()

for index, user := range q.users {
for i, user := range q.users {
if user.ID != arg.ID {
continue
}
user.HashedPassword = arg.HashedPassword
q.users[index] = user
q.users[i] = user
return nil
}
return sql.ErrNoRows
Expand Down