update: server manage

This commit is contained in:
tokumeikoi 2020-12-13 14:16:07 +08:00
parent 3b969c2c52
commit 17be643ce2

View File

@ -304,7 +304,7 @@ class ServerService
} else { } else {
$server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_SHADOWSOCKS_LAST_CHECK_AT', $server[$i]['id'])); $server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_SHADOWSOCKS_LAST_CHECK_AT', $server[$i]['id']));
} }
$server[$i]['available'] = (time() - 300) > $server[$i]['last_check_at']; $server[$i]['available'] = (time() - 300) < $server[$i]['last_check_at'];
} }
return $server->toArray(); return $server->toArray();
} }
@ -333,7 +333,7 @@ class ServerService
} else { } else {
$server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_V2RAY_LAST_CHECK_AT', $server[$i]['id'])); $server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_V2RAY_LAST_CHECK_AT', $server[$i]['id']));
} }
$server[$i]['available'] = (time() - 300) > $server[$i]['last_check_at']; $server[$i]['available'] = (time() - 300) < $server[$i]['last_check_at'];
} }
return $server->toArray(); return $server->toArray();
} }
@ -353,7 +353,7 @@ class ServerService
} else { } else {
$server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server[$i]['id'])); $server[$i]['last_check_at'] = Cache::get(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server[$i]['id']));
} }
$server[$i]['available'] = (time() - 300) > $server[$i]['last_check_at']; $server[$i]['available'] = (time() - 300) < $server[$i]['last_check_at'];
} }
return $server->toArray(); return $server->toArray();
} }