]> BookStack Code Mirror - bookstack/blobdiff - app/Api/ApiDocsGenerator.php
Tests: Updated comment test to account for new editor usage
[bookstack] / app / Api / ApiDocsGenerator.php
index 9cae80617e5ae2a44c76003f50a0bd32b6744a61..287c838779060b9e23fa600f61e758d862649658 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace BookStack\Api;
 
+use BookStack\App\AppVersion;
 use BookStack\Http\ApiController;
 use Exception;
 use Illuminate\Contracts\Container\BindingResolutionException;
@@ -25,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;