Add message field for version check #395
This commit is contained in:
parent
50e38e1e4b
commit
7043f0c483
1 changed files with 6 additions and 0 deletions
|
|
@ -2664,6 +2664,7 @@ class APIController extends Controller implements LoggedController
|
|||
}
|
||||
|
||||
$need_update = false;
|
||||
$msg = 'Version is up to date.';
|
||||
|
||||
$api_version = $this->getParameter('api_version');
|
||||
|
||||
|
|
@ -2680,10 +2681,15 @@ class APIController extends Controller implements LoggedController
|
|||
}
|
||||
|
||||
if ($api_v[0] > $app_v[0])
|
||||
{
|
||||
$need_update = true;
|
||||
$msg = 'Your version is outdated and needs an update to use the latest features RES-Q has to offer.';
|
||||
}
|
||||
|
||||
|
||||
$data = [
|
||||
'need_update' => $need_update,
|
||||
'message' => $msg,
|
||||
];
|
||||
|
||||
$res->setData($data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue