mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 19:47:27 +00:00
Implement new machine register parameter
This commit is contained in:
10
grpcv1.go
10
grpcv1.go
@@ -415,11 +415,11 @@ func (api headscaleV1APIServer) DebugCreateMachine(
|
||||
HostInfo: datatypes.JSON(hostinfoJson),
|
||||
}
|
||||
|
||||
// log.Trace().Caller().Interface("machine", newMachine).Msg("")
|
||||
|
||||
if err := api.h.db.Create(&newMachine).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
api.h.registrationCache.Set(
|
||||
request.GetKey(),
|
||||
newMachine,
|
||||
requestedExpiryCacheExpiration,
|
||||
)
|
||||
|
||||
return &v1.DebugCreateMachineResponse{Machine: newMachine.toProto()}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user