mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-02 14:07:47 +09:00
Make "authKey" a constant
This commit is contained in:
7
api.go
7
api.go
@@ -18,7 +18,10 @@ import (
|
||||
"tailscale.com/types/wgkey"
|
||||
)
|
||||
|
||||
const reservedResponseHeaderSize = 4
|
||||
const (
|
||||
reservedResponseHeaderSize = 4
|
||||
RegisterMethodAuthKey = "authKey"
|
||||
)
|
||||
|
||||
// KeyHandler provides the Headscale pub key
|
||||
// Listens in /key.
|
||||
@@ -536,7 +539,7 @@ func (h *Headscale) handleAuthKey(
|
||||
HexString()
|
||||
// we update it just in case
|
||||
machine.Registered = true
|
||||
machine.RegisterMethod = "authKey"
|
||||
machine.RegisterMethod = RegisterMethodAuthKey
|
||||
h.db.Save(&machine)
|
||||
|
||||
pak.Used = true
|
||||
|
||||
Reference in New Issue
Block a user