1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +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,8 +11,8 @@ use Illuminate\Http\UploadedFile;
class BaseRepo
{
protected $tagRepo;
protected $imageRepo;
protected TagRepo $tagRepo;
protected ImageRepo $imageRepo;
public function __construct(TagRepo $tagRepo, ImageRepo $imageRepo)
{
@ -58,6 +58,7 @@ class BaseRepo
if (isset($input['tags'])) {
$this->tagRepo->saveTagsToEntity($entity, $input['tags']);
$entity->touch();
}
$entity->rebuildPermissions();