cli,hscontrol: use ID-based preauthkey operations
This commit is contained in:
parent
8631581852
commit
1325fd8b27
6 changed files with 43 additions and 112 deletions
|
|
@ -58,12 +58,12 @@ func DestroyUser(tx *gorm.DB, uid types.UserID) error {
|
|||
return ErrUserStillHasNodes
|
||||
}
|
||||
|
||||
keys, err := ListPreAuthKeysByUser(tx, uid)
|
||||
keys, err := ListPreAuthKeys(tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, key := range keys {
|
||||
err = DestroyPreAuthKey(tx, key)
|
||||
err = DestroyPreAuthKey(tx, key.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue