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