🆙 More fixes 🆙

This commit is contained in:
Remco
2026-01-19 20:43:46 +01:00
parent deed2158ca
commit 7b9849c159
77 changed files with 1084 additions and 13612 deletions
@@ -39,7 +39,10 @@ class ArticleController extends Controller
public function toggleReaction(WebsiteArticle $article, Request $request): JsonResponse
{
$response = $this->reactionService->toggleReaction($article, Auth::user(), $request);
/** @var \App\Models\User $user */
$user = $request->user();
$response = $this->reactionService->toggleReaction($article, $user, $request);
return response()->json($response);
}
@@ -11,11 +11,11 @@ use Illuminate\Http\RedirectResponse;
class WebsiteArticleCommentsController extends Controller
{
public function __construct(public readonly CommentService $commentService): void {}
public function __construct(public readonly CommentService $commentService) {}
public function store(WebsiteArticle $article, ArticleCommentFormRequest $request): RedirectResponse
{
$this->commentService->store($request->get('comment'), $article);
$this->commentService->store($request->string('comment')->toString(), $article);
return back()->with('success', __('You comment has been posted!'));
}