X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/04a86141361e941d2053ca16181e7561bff27650..refs/pull/2003/head:/app/Http/Controllers/Api/BooksApiController.php diff --git a/app/Http/Controllers/Api/BooksApiController.php b/app/Http/Controllers/Api/BooksApiController.php index e7a0217dc..ac4ea171c 100644 --- a/app/Http/Controllers/Api/BooksApiController.php +++ b/app/Http/Controllers/Api/BooksApiController.php @@ -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) {