From 9ceb3567c99cf7f94faace90b3498dba74f9ea22 Mon Sep 17 00:00:00 2001 From: dongpd Date: Wed, 19 May 2021 10:31:09 +0000 Subject: [PATCH] Update 'controllers/ApiController.php' fix bug regenfeature --- controllers/ApiController.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/controllers/ApiController.php b/controllers/ApiController.php index 3db5bb7d..67b3e473 100644 --- a/controllers/ApiController.php +++ b/controllers/ApiController.php @@ -486,9 +486,14 @@ class ApiController extends Controller { 'data' => "false" ]); } else { - if ($this->check512()) - $updating->data = "true"; - else + if ($this->check512()) { + $currentCache = json_decode(file_get_contents("http://localhost:2305/current-cache"), true); + if ($currentCache['n_128'] == $currentCache['n_512']) { + $updating->data = "true"; + } else { + $updating->data = "false"; + } + } else $updating->data = "false"; $updating->save(); }