Convert missing from api.go
This commit is contained in:
parent
ee704f8ef3
commit
0bb2fabc6c
1 changed files with 8 additions and 2 deletions
10
api.go
10
api.go
|
@ -92,7 +92,10 @@ func (h *Headscale) RegistrationHandler(c *gin.Context) {
|
||||||
NodeKey: wgkey.Key(req.NodeKey).HexString(),
|
NodeKey: wgkey.Key(req.NodeKey).HexString(),
|
||||||
}
|
}
|
||||||
if err := h.db.Create(&m).Error; err != nil {
|
if err := h.db.Create(&m).Error; err != nil {
|
||||||
log.Printf("Could not create row: %s", err)
|
log.Error().
|
||||||
|
Str("Handler", "Registration").
|
||||||
|
Err(err).
|
||||||
|
Msg("Could not create row")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,7 +338,10 @@ func (h *Headscale) PollNetMapHandler(c *gin.Context) {
|
||||||
Msg("Sending initial map")
|
Msg("Sending initial map")
|
||||||
pollData <- *data
|
pollData <- *data
|
||||||
|
|
||||||
log.Printf("[PollMap] (%s) Notifying peers", m.Name)
|
log.Info().
|
||||||
|
Str("Handler", "PollNetMap").
|
||||||
|
Str("Machine", m.Name).
|
||||||
|
Msg("Notifying peers")
|
||||||
peers, _ := h.getPeers(m)
|
peers, _ := h.getPeers(m)
|
||||||
h.pollMu.Lock()
|
h.pollMu.Lock()
|
||||||
for _, p := range *peers {
|
for _, p := range *peers {
|
||||||
|
|
Loading…
Reference in a new issue