Skip to content

Commit

Permalink
Cleaning up ProjectControllerTest. Adding Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
agordon-vivid committed Dec 3, 2024
1 parent 8f1a823 commit 099af8e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public ResponseEntity<CollectionModel<ProjectModel>> getAllProjects() {
ResponseEntity<CollectionModel<ProjectModel>> response;

try {
response = ok(projectService.getAllProjects());
CollectionModel<ProjectModel> allProjects = projectService.getAllProjects();
response = ok(allProjects);
} catch (ServiceException e) {
response = internalServerError();
log.error(" ### Error while fetching Projects", e);
Expand Down Expand Up @@ -110,7 +111,6 @@ public ResponseEntity<ProjectModel> createProject(@RequestBody ProjectModel reso
resource.setCreateUser(getWebAdeAuthentication().getUserId());
resource.setUpdateUser(getWebAdeAuthentication().getUserId());
resource.setRevisionCount(0);
// resource.setProgramAreaGuid(UUID.randomUUID().toString());

ProjectModel newResource = projectService.createOrUpdateProject(resource);
response = newResource == null ? badRequest() : created(newResource);
Expand Down

0 comments on commit 099af8e

Please sign in to comment.