Обновить src/main/java/org/lanit/controllers/JSONController.java
This commit is contained in:
parent
e575a33e0e
commit
46f1af6120
@ -51,13 +51,17 @@ public class JSONController {
|
|||||||
response.setInfo(modifiedInfo);
|
response.setInfo(modifiedInfo);
|
||||||
response.setUuid(deleteRequest.getUuid());
|
response.setUuid(deleteRequest.getUuid());
|
||||||
response.setLastUpdate(Instant.now().toString());
|
response.setLastUpdate(Instant.now().toString());
|
||||||
return ResponseEntity.ok(response);
|
return ResponseEntity.ok()
|
||||||
|
.contentType(MediaType.APPLICATION_JSON) // Явно указываем без charset
|
||||||
|
.body(response);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ErrorResponse error = new ErrorResponse();
|
ErrorResponse error = new ErrorResponse();
|
||||||
error.setStatus("error");
|
error.setStatus("error");
|
||||||
error.setMessage("Передан некорректный action - " + action);
|
error.setMessage("Передан некорректный action - " + action);
|
||||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(error);
|
return ResponseEntity.status(HttpStatus.BAD_REQUEST)
|
||||||
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
|
.body(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user