]> BookStack Code Mirror - bookstack/blobdiff - app/Api/ApiDocsController.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / app / Api / ApiDocsController.php
index 020c8902f32a19a7d0ef5a896c78874ca10c5eb1..d88dba3bc2f8100de18436548e16e0bf07831dd1 100644 (file)
@@ -28,4 +28,14 @@ class ApiDocsController extends ApiController
 
         return response()->json($docs);
     }
+
+    /**
+     * Redirect to the API docs page.
+     *  Required as a controller method, instead of the Route::redirect helper,
+     *  to ensure the URL is generated correctly.
+     */
+    public function redirect()
+    {
+        return redirect('/api/docs');
+    }
 }