Improve version handling.

This commit is contained in:
James Cole
2019-10-30 20:02:38 +01:00
parent 9a028d5002
commit cbc92d89e1
6 changed files with 25 additions and 5 deletions

View File

@@ -116,6 +116,8 @@ class UpdateController extends Controller
$latestRelease = '1.0';
$resultString = '';
$versionCheck = -2;
$channel = app('fireflyconfig')->get('update_channel', 'stable')->data;
try {
$latestRelease = $this->getLatestRelease();
} catch (FireflyException $e) {
@@ -143,6 +145,11 @@ class UpdateController extends Controller
}
app('fireflyconfig')->set('last_update_check', time());
return response()->json(['result' => $resultString]);
return response()->json(
[
'result' => $resultString,
'channel' => $channel,
]
);
}
}