mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Bubble error up to user for rename
This commit is contained in:
parent
14994cb6cc
commit
62808cbd86
1 changed files with 7 additions and 4 deletions
11
grpcv1.go
11
grpcv1.go
|
@ -215,7 +215,7 @@ func (api headscaleV1APIServer) ExpireMachine(
|
||||||
)
|
)
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("machine", machine.Name).
|
Str("machine", machine.Hostname).
|
||||||
Time("expiry", *machine.Expiry).
|
Time("expiry", *machine.Expiry).
|
||||||
Msg("machine expired")
|
Msg("machine expired")
|
||||||
|
|
||||||
|
@ -231,13 +231,16 @@ func (api headscaleV1APIServer) RenameMachine(
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
api.h.RenameMachine(
|
err = api.h.RenameMachine(
|
||||||
machine,
|
machine,
|
||||||
request.GetNewName(),
|
request.GetNewName(),
|
||||||
)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("machine", machine.Name).
|
Str("machine", machine.Hostname).
|
||||||
Time("expiry", *machine.Expiry).
|
Time("expiry", *machine.Expiry).
|
||||||
Msg("machine expired")
|
Msg("machine expired")
|
||||||
|
|
||||||
|
@ -393,7 +396,7 @@ func (api headscaleV1APIServer) DebugCreateMachine(
|
||||||
|
|
||||||
newMachine := Machine{
|
newMachine := Machine{
|
||||||
MachineKey: request.GetKey(),
|
MachineKey: request.GetKey(),
|
||||||
Name: request.GetName(),
|
Hostname: request.GetName(),
|
||||||
Namespace: *namespace,
|
Namespace: *namespace,
|
||||||
|
|
||||||
Expiry: &time.Time{},
|
Expiry: &time.Time{},
|
||||||
|
|
Loading…
Reference in a new issue