текстовые ответы в .body
This commit is contained in:
@@ -35,15 +35,15 @@ public class EmployeeController {
|
|||||||
if (employeeService.isCodeValid(code)) {
|
if (employeeService.isCodeValid(code)) {
|
||||||
return ResponseEntity
|
return ResponseEntity
|
||||||
.status(HttpStatus.OK)
|
.status(HttpStatus.OK)
|
||||||
.body("<html><i> данный код существует - можно пользоваться приложением</b></html>");
|
.body("данный код существует - можно пользоваться приложением");
|
||||||
} else if (code == null) {
|
} else if (code == null) {
|
||||||
return ResponseEntity
|
return ResponseEntity
|
||||||
.status(HttpStatus.BAD_REQUEST)
|
.status(HttpStatus.BAD_REQUEST)
|
||||||
.body("<html><b> что-то пошло не так</b></html>");
|
.body("что-то пошло не так");
|
||||||
} else {
|
} else {
|
||||||
return ResponseEntity
|
return ResponseEntity
|
||||||
.status(HttpStatus.UNAUTHORIZED)
|
.status(HttpStatus.UNAUTHORIZED)
|
||||||
.body("<html>кода не существует</html>");
|
.body("кода не существует");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user