diff --git a/api.go b/api.go index e0c5e75..7b98dfa 100644 --- a/api.go +++ b/api.go @@ -397,6 +397,7 @@ func (h *Headscale) handleNewServer(c *gin.Context, db *gorm.DB, idKey wgcfg.Key m.IPAddress = ip.String() m.NamespaceID = pak.NamespaceID m.AuthKeyID = uint(pak.ID) + m.RegisterMethod = "authKey" m.Registered = true db.Save(&m) diff --git a/cli.go b/cli.go index 0cb5333..f75bb47 100644 --- a/cli.go +++ b/cli.go @@ -43,6 +43,7 @@ func (h *Headscale) RegisterMachine(key string, namespace string) error { m.IPAddress = ip.String() m.NamespaceID = ns.ID m.Registered = true + m.RegisterMethod = "cli" db.Save(&m) fmt.Println("Machine registered 🎉") return nil