]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/BooksApiController.php
Update settings.php
[bookstack] / app / Http / Controllers / Api / BooksApiController.php
index e7a0217dcdeaa2aa507a908ecc801cf27b1a6819..ac4ea171c7e9633606011f907b2078b52ffe3d86 100644 (file)
@@ -2,8 +2,11 @@
 
 use BookStack\Entities\Book;
 use BookStack\Entities\Repos\BookRepo;
+use BookStack\Exceptions\NotifyException;
 use BookStack\Facades\Activity;
+use Illuminate\Contracts\Container\BindingResolutionException;
 use Illuminate\Http\Request;
+use Illuminate\Validation\ValidationException;
 
 class BooksApiController extends ApiController
 {
@@ -31,9 +34,8 @@ class BooksApiController extends ApiController
 
     /**
      * Get a listing of books visible to the user.
-     * @api listing
      */
-    public function index()
+    public function list()
     {
         $books = Book::visible();
         return $this->apiListingResponse($books, [
@@ -42,8 +44,8 @@ class BooksApiController extends ApiController
     }
 
     /**
-     * Create a new book.
-     * @throws \Illuminate\Validation\ValidationException
+     * Create a new book in the system.
+     * @throws ValidationException
      */
     public function create(Request $request)
     {
@@ -67,7 +69,7 @@ class BooksApiController extends ApiController
 
     /**
      * Update the details of a single book.
-     * @throws \Illuminate\Validation\ValidationException
+     * @throws ValidationException
      */
     public function update(Request $request, string $id)
     {
@@ -82,9 +84,9 @@ class BooksApiController extends ApiController
     }
 
     /**
-     * Delete a book from the system.
-     * @throws \BookStack\Exceptions\NotifyException
-     * @throws \Illuminate\Contracts\Container\BindingResolutionException
+     * Delete a single book from the system.
+     * @throws NotifyException
+     * @throws BindingResolutionException
      */
     public function delete(string $id)
     {