Apply suggestions from code review
Renamed AlreadyUsed to Used Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
This commit is contained in:
parent
30788e1a70
commit
93517aa6f8
4 changed files with 7 additions and 7 deletions
|
@ -21,7 +21,7 @@ type PreAuthKey struct {
|
|||
Namespace Namespace
|
||||
Reusable bool
|
||||
Ephemeral bool `gorm:"default:false"`
|
||||
AlreadyUsed bool `gorm:"default:false"`
|
||||
Used bool `gorm:"default:false"`
|
||||
|
||||
CreatedAt *time.Time
|
||||
Expiration *time.Time
|
||||
|
@ -111,7 +111,7 @@ func (h *Headscale) checkKeyValidity(k string) (*PreAuthKey, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if len(machines) != 0 || pak.AlreadyUsed {
|
||||
if len(machines) != 0 || pak.Used {
|
||||
return nil, errorAuthKeyNotReusableAlreadyUsed
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue