Skip to content

Commit

Permalink
fix: add missing test persister implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lfleischmann committed Feb 22, 2024
1 parent 5b361b6 commit 6cb6de2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions backend/test/password_credential_persister.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,17 @@ func (p passwordCredentialPersister) Update(password models.PasswordCredential)
}
return nil
}

func (p *passwordCredentialPersister) Delete(password models.PasswordCredential) error {
index := -1
for i, data := range p.passwords {
if data.ID == password.ID {
index = i
}
}
if index > -1 {
p.passwords = append(p.passwords[:index], p.passwords[index+1:]...)
}

return nil
}

0 comments on commit 6cb6de2

Please sign in to comment.