mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-22 07:57:34 +00:00
Fixed minor linting things
This commit is contained in:
parent
43ad0d4416
commit
b6e3cd81c6
@ -100,11 +100,9 @@ func (h *Headscale) handleRegisterCommon(
|
|||||||
registerRequest tailcfg.RegisterRequest,
|
registerRequest tailcfg.RegisterRequest,
|
||||||
machineKey key.MachinePublic,
|
machineKey key.MachinePublic,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
now := time.Now().UTC()
|
now := time.Now().UTC()
|
||||||
machine, err := h.GetMachineByAnyNodeKey(registerRequest.NodeKey, registerRequest.OldNodeKey)
|
machine, err := h.GetMachineByAnyNodeKey(registerRequest.NodeKey, registerRequest.OldNodeKey)
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
|
||||||
// If the machine has AuthKey set, handle registration via PreAuthKeys
|
// If the machine has AuthKey set, handle registration via PreAuthKeys
|
||||||
if registerRequest.Auth.AuthKey != "" {
|
if registerRequest.Auth.AuthKey != "" {
|
||||||
h.handleAuthKeyCommon(writer, req, registerRequest, machineKey)
|
h.handleAuthKeyCommon(writer, req, registerRequest, machineKey)
|
||||||
@ -242,7 +240,6 @@ func (h *Headscale) handleRegisterCommon(
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleAuthKeyCommon contains the logic to manage auth key client registration
|
// handleAuthKeyCommon contains the logic to manage auth key client registration
|
||||||
@ -676,7 +673,6 @@ func (h *Headscale) handleMachineRefreshKeyCommon(
|
|||||||
Str("old_node_key", registerRequest.OldNodeKey.ShortString()).
|
Str("old_node_key", registerRequest.OldNodeKey.ShortString()).
|
||||||
Str("machine", machine.Hostname).
|
Str("machine", machine.Hostname).
|
||||||
Msg("Machine successfully refreshed")
|
Msg("Machine successfully refreshed")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Headscale) handleMachineExpiredCommon(
|
func (h *Headscale) handleMachineExpiredCommon(
|
||||||
|
@ -55,5 +55,4 @@ func (h *Headscale) RegistrationHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
h.handleRegisterCommon(writer, req, registerRequest, machineKey)
|
h.handleRegisterCommon(writer, req, registerRequest, machineKey)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user