]> BookStack Code Mirror - bookstack/blobdiff - app/Api/ApiDocsGenerator.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / app / Api / ApiDocsGenerator.php
index bffc38623bfa75e0dfeea3f51f696e7413116b18..287c838779060b9e23fa600f61e758d862649658 100644 (file)
@@ -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;