Convert missing from api.go

This commit is contained in:
Kristoffer Dalby 2021-08-05 18:16:21 +01:00
parent ee704f8ef3
commit 0bb2fabc6c
No known key found for this signature in database
GPG key ID: 09F62DC067465735

10
api.go
View file

@ -92,7 +92,10 @@ func (h *Headscale) RegistrationHandler(c *gin.Context) {
NodeKey: wgkey.Key(req.NodeKey).HexString(),
}
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
}
}
@ -335,7 +338,10 @@ func (h *Headscale) PollNetMapHandler(c *gin.Context) {
Msg("Sending initial map")
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)
h.pollMu.Lock()
for _, p := range *peers {