Explorar o código

update lastcheckin in addition to lastmodified on node update

Matthew R. Kasun %!s(int64=3) %!d(string=hai) anos
pai
achega
8eb34cd944
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      mq/handlers.go

+ 1 - 0
mq/handlers.go

@@ -77,6 +77,7 @@ func UpdateNode(client mqtt.Client, msg mqtt.Message) {
 			logger.Log(1, "error unmarshaling payload ", err.Error())
 			return
 		}
+		newNode.SetLastCheckIn()
 		if err := logic.UpdateNode(&currentNode, &newNode); err != nil {
 			logger.Log(1, "error saving node", err.Error())
 			return