Roster tests working

This commit is contained in:
reynisson
2021-11-28 20:33:01 +01:00
parent c446a854ee
commit 09e139cdf8
3 changed files with 4 additions and 7 deletions

View File

@@ -45,8 +45,8 @@ public class ApplyForTaskWebController {
try {
String executorType = command.getTaskType().toString();
String executorURI = command.getExecutorURI().toString();
String executorType = command.getTaskType().getValue().toString();
String executorURI = command.getExecutorURI().getValue().toString();
String jsonPayLoad = new JSONObject()
.put("executorType", executorType)
@@ -56,7 +56,7 @@ public class ApplyForTaskWebController {
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.add("Content-Type", "application/json");
return new ResponseEntity<>(jsonPayLoad, responseHeaders, HttpStatus.OK);
return new ResponseEntity<>(jsonPayLoad, responseHeaders, HttpStatus.CREATED);
} catch (ConstraintViolationException e) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage());
}