X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/968bc8cdf354d9cbe29b88abdc747a7845031fab..refs/pull/5676/head:/app/Api/ApiDocsGenerator.php diff --git a/app/Api/ApiDocsGenerator.php b/app/Api/ApiDocsGenerator.php index bffc38623..287c83877 100644 --- a/app/Api/ApiDocsGenerator.php +++ b/app/Api/ApiDocsGenerator.php @@ -2,12 +2,12 @@ namespace BookStack\Api; +use BookStack\App\AppVersion; use BookStack\Http\ApiController; use Exception; use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Route; use Illuminate\Support\Str; use Illuminate\Validation\Rules\Password; @@ -26,7 +26,7 @@ class ApiDocsGenerator */ public static function generateConsideringCache(): Collection { - $appVersion = trim(file_get_contents(base_path('version'))); + $appVersion = AppVersion::get(); $cacheKey = 'api-docs::' . $appVersion; $isProduction = config('app.env') === 'production'; $cacheVal = $isProduction ? Cache::get($cacheKey) : null;