fix: address code review issues
- Rename `read` column to `is_read` (PostgreSQL reserved word) - Wrap navbar + modal in parent div for Stimulus controller scope - Set temporary filePath before first flush in ImportController - Use RETURNING clause for atomic incrementProcessedBatches - Return proper empty 204 response in NotificationController Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,7 @@ class ImportController extends AbstractController
|
||||
|
||||
$import = new Import();
|
||||
$import->setUser($user);
|
||||
$import->setFilePath('pending');
|
||||
|
||||
$em->persist($import);
|
||||
$em->flush();
|
||||
|
||||
@@ -37,13 +37,13 @@ class NotificationController extends AbstractController
|
||||
|
||||
#[Route('/api/notifications/read', methods: ['POST'])]
|
||||
#[IsGranted('ROLE_USER')]
|
||||
public function markRead(NotificationRepository $notificationRepository): JsonResponse
|
||||
public function markRead(NotificationRepository $notificationRepository): Response
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = $this->getUser();
|
||||
|
||||
$notificationRepository->markAllReadForUser($user);
|
||||
|
||||
return $this->json(null, Response::HTTP_NO_CONTENT);
|
||||
return new Response('', Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user