From c3e6000b4edff0c957cd477ca4692ef6e282f57b Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 2 Dec 2022 09:19:21 +0000 Subject: [PATCH] * Fix heatbeat fail. --- api/v1/entries/hostheartbeat.php | 2 +- api/v1/entries/zanodeheartbeat.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);