1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added a view for the API docs

This commit is contained in:
Dan Brown
2020-01-15 20:18:02 +00:00
parent bed2498667
commit 45b5e631e2
9 changed files with 133 additions and 13 deletions

View File

@ -13,9 +13,9 @@ class ApiDocsController extends ApiController
public function display()
{
$docs = $this->getDocs();
dd($docs);
// TODO - Build view for API docs
return view('');
return view('api-docs.index', [
'docs' => $docs,
]);
}
/**

View 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
{
@ -41,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)
{
@ -66,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)
{
@ -81,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)
{