1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Touched entity timestamps on entity tag update

Decided it's relevant to entity updated_at since tags are now indexed
alongside content.

- Also fixed tags not applied on shelf.
- Also enforced proper page API update validation.
- Adds tests to cover.

For #3319
Fixes #3370
This commit is contained in:
Dan Brown
2022-04-04 17:24:05 +01:00
parent affae2e3c4
commit c30a9d3564
7 changed files with 84 additions and 14 deletions

View File

@ -11,21 +11,20 @@ use Illuminate\Validation\ValidationException;
class BookshelfApiController extends ApiController
{
/**
* @var BookshelfRepo
*/
protected $bookshelfRepo;
protected BookshelfRepo $bookshelfRepo;
protected $rules = [
'create' => [
'name' => ['required', 'string', 'max:255'],
'description' => ['string', 'max:1000'],
'books' => ['array'],
'tags' => ['array'],
],
'update' => [
'name' => ['string', 'min:1', 'max:255'],
'description' => ['string', 'max:1000'],
'books' => ['array'],
'tags' => ['array'],
],
];