Merge branch '16-no-validation-on-login-route-causes-nullpointer' into 'dev'
Resolve "No validation on login route causes NullPointer" Closes #16 See merge request sa4-2020/the-sanmarinoes/backend!21
This commit is contained in:
commit
b6add2aaf6
@ -43,7 +43,8 @@ public class AuthenticationController {
|
||||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
public JWTResponse login(@RequestBody JWTRequest authenticationRequest) throws Exception {
|
||||
public JWTResponse login(@Valid @RequestBody JWTRequest authenticationRequest)
|
||||
throws Exception {
|
||||
if (authenticationRequest.getUsernameOrEmail().contains("@")) {
|
||||
// usernameOrEmail contains an email, so fetch the corresponding username
|
||||
final User user =
|
||||
|
Loading…
Reference in New Issue
Block a user