feat: add bylaw management features including documents, legal authorities, subject categories, and nodes
This commit is contained in:
@@ -15,18 +15,18 @@ class VersionController extends Controller
|
||||
{
|
||||
$version = Version::query()->where('type', $versionRequest->type)->orderBy('id', 'desc')->first();
|
||||
|
||||
if (!$version) {
|
||||
if (! $version) {
|
||||
return $this->failed([], 'Version not found');
|
||||
}
|
||||
|
||||
if (intval($version->number) > $versionRequest->number) {
|
||||
return $this->success([
|
||||
'force_update' => $version->force_update == 1 ? true : false
|
||||
'force_update' => $version->force_update == 1 ? true : false,
|
||||
], 'Your app need to be updated');
|
||||
}
|
||||
|
||||
return $this->success([
|
||||
'force_update' => false
|
||||
'force_update' => false,
|
||||
], 'Version successfully');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user