Skip to content

Commit 66972d3

Browse files
Refactor responders HTTP status
1 parent 8c8e883 commit 66972d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/app/Account/Infrastructure/Auth/AuthAccessControl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function handle(Request $request, \Closure $next): mixed
4949
default => false,
5050
};
5151

52-
if (! $access) {
52+
if (!$access) {
5353
abort(
5454
code: Response::HTTP_FORBIDDEN,
5555
message: 'Access denied.'

src/app/Account/Presentation/Responder/LogoutResponder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function respond(bool $result): MessageResponse
2424

2525
return new MessageResponse(
2626
message: 'Logout failed. Please try again.',
27-
status: Response::HTTP_BAD_REQUEST
27+
status: Response::HTTP_INTERNAL_SERVER_ERROR
2828
);
2929
}
3030
}

src/app/Account/Presentation/Responder/RegisterResponder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function respond(bool $result): MessageResponse
2424

2525
return new MessageResponse(
2626
message: 'Registration failed. Try again.',
27-
status: Response::HTTP_BAD_REQUEST
27+
status: Response::HTTP_INTERNAL_SERVER_ERROR
2828
);
2929
}
3030
}

0 commit comments

Comments
 (0)