1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

API: Added system read endpoint

Standardised logic for reading app version to its own static class.
This commit is contained in:
Dan Brown
2025-05-13 20:38:08 +01:00
parent 3e99ce4098
commit 058007109e
10 changed files with 77 additions and 19 deletions

View File

@ -2,6 +2,7 @@
namespace BookStack\Exceptions;
use BookStack\App\AppVersion;
use Illuminate\Contracts\Foundation\ExceptionRenderer;
class BookStackExceptionHandlerPage implements ExceptionRenderer
@ -30,9 +31,7 @@ class BookStackExceptionHandlerPage implements ExceptionRenderer
return [
'PHP Version' => phpversion(),
'BookStack Version' => $this->safeReturn(function () {
$versionFile = base_path('version');
return trim(file_get_contents($versionFile));
return AppVersion::get();
}, 'unknown'),
'Theme Configured' => $this->safeReturn(function () {
return config('view.theme');