mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-06 12:02:45 +03:00
API: Added system read endpoint
Standardised logic for reading app version to its own static class.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace BookStack\Settings;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\App\AppVersion;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Users\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -26,12 +27,9 @@ class SettingController extends Controller
|
||||
$this->checkPermission('settings-manage');
|
||||
$this->setPageTitle(trans('settings.settings'));
|
||||
|
||||
// Get application version
|
||||
$version = trim(file_get_contents(base_path('version')));
|
||||
|
||||
return view('settings.categories.' . $category, [
|
||||
'category' => $category,
|
||||
'version' => $version,
|
||||
'version' => AppVersion::get(),
|
||||
'guestUser' => User::getGuest(),
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user