Skip to content

Commit

Permalink
Minor corrections (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky authored Jul 24, 2023
1 parent c9e54b7 commit 52b2774
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
schedule:
- cron: '34 4 * * 6'
push:
branches: [ "4.6.x" ]
branches: [ "4.6.x", "4.7.x" ]

# Declare default permissions as read only.
permissions: read-all
Expand Down
3 changes: 2 additions & 1 deletion src/symfony/src/Security/Handler/DefaultSuccessHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public function onSuccess(Request $request): Response
'status' => 'ok',
'errorMessage' => '',
];
$statusCode = $request->getMethod() === Request::METHOD_POST ? Response::HTTP_CREATED : Response::HTTP_OK;

return new JsonResponse($data, JsonResponse::HTTP_OK);
return new JsonResponse($data, $statusCode);
}

public function onAuthenticationSuccess(Request $request, TokenInterface $token): Response
Expand Down

0 comments on commit 52b2774

Please sign in to comment.