File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/kotlin/com/vitekkor/frogapi/controller Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class ApiController(
32
32
) = withContext(Dispatchers .IO ) {
33
33
logger.info(" Incoming frog request with token $token " )
34
34
val tokenFromDB = tokenService.getToken(token) ? : kotlin.run {
35
- httpServletResponse.status = 403
35
+ httpServletResponse.status = 401
36
36
return @withContext
37
37
}
38
38
tokenFromDB.requests++
@@ -60,7 +60,7 @@ class ApiController(
60
60
userRepository.findOneByEmail(email)
61
61
}
62
62
if (user == null || user.password != password.encodeBase64()) {
63
- return ResponseEntity .status(HttpStatus .FORBIDDEN ).build()
63
+ return ResponseEntity .status(HttpStatus .UNAUTHORIZED ).build()
64
64
}
65
65
val newToken = tokenService.generateToken(user)
66
66
tokenService.saveToken(newToken)
You can’t perform that action at this time.
0 commit comments