public function updateForEntity($entityType, $entityId, Request $request)
{
$entity = $this->tagRepo->getEntity($entityType, $entityId, 'update');
if ($entity === null) {
return $this->jsonError("Entity not found", 404);
}
$inputTags = $request->input('tags');
$tags = $this->tagRepo->saveTagsToEntity($entity, $inputTags);
return response()->json(['tags' => $tags, 'message' => 'Tags successfully updated']);
}