|
@@ -311,11 +311,11 @@ func hostUpdateFallback(w http.ResponseWriter, r *http.Request) {
|
|
var hostUpdate models.HostUpdate
|
|
var hostUpdate models.HostUpdate
|
|
err = json.NewDecoder(r.Body).Decode(&hostUpdate)
|
|
err = json.NewDecoder(r.Body).Decode(&hostUpdate)
|
|
if err != nil {
|
|
if err != nil {
|
|
- logger.Log(0, r.Header.Get("user"), "failed to update a host:", err.Error())
|
|
|
|
|
|
+ slog.Error("failed to update a host:", "user", r.Header.Get("user"), "error", err.Error())
|
|
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
|
|
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- slog.Info("recieved host update", "name", hostUpdate.Host.Name, "id", hostUpdate.Host.ID)
|
|
|
|
|
|
+ slog.Info("recieved host update", "name", hostUpdate.Host.Name, "id", hostUpdate.Host.ID, "action", hostUpdate.Action)
|
|
switch hostUpdate.Action {
|
|
switch hostUpdate.Action {
|
|
case models.CheckIn:
|
|
case models.CheckIn:
|
|
sendPeerUpdate = mq.HandleHostCheckin(&hostUpdate.Host, currentHost)
|
|
sendPeerUpdate = mq.HandleHostCheckin(&hostUpdate.Host, currentHost)
|