diff --git a/api/v1/entries/hostheartbeat.php b/api/v1/entries/hostheartbeat.php index f95107fa14..7e38b33a52 100644 --- a/api/v1/entries/hostheartbeat.php +++ b/api/v1/entries/hostheartbeat.php @@ -31,7 +31,7 @@ class hostHeartbeatEntry extends baseEntry $now = helper::now(); if(!$status) return $this->sendError(400, 'Params error.'); - $conditionField = $secret ? 'secret' : 'token'; + $conditionField = $secret ? 'secret' : 'tokenSN'; $conditionValue = $secret ? $secret : $token; $host = new stdclass(); $host->status = $status; diff --git a/api/v1/entries/zanodeheartbeat.php b/api/v1/entries/zanodeheartbeat.php index 88b02f1492..8735c4edc5 100644 --- a/api/v1/entries/zanodeheartbeat.php +++ b/api/v1/entries/zanodeheartbeat.php @@ -56,7 +56,7 @@ class zanodeHeartbeatEntry extends baseEntry if(!$secret) return $this->sendSuccess(200, 'success'); - $host->tokenTimeUnix = strtotime($host->expiredDate); + $host->tokenTimeUnix = strtotime($host->tokenTime); unset($host->status); unset($host->tokenTime);