Skip to content

Commit

Permalink
Improve name and docs of method to retrieve VS for user
Browse files Browse the repository at this point in the history
  • Loading branch information
forus committed Jul 9, 2024
1 parent b8ee5e9 commit 755bc3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public VirtualStudy getVirtualStudyById(String id) {
}

/**
* Get list of virtual studies by username
* @param username - user assigned to the virtual study
* Get list of virtual studies accessible to user
* @param username - user for whom get list of virtual studies
* @return - list of virtual studies
*/
public List<VirtualStudy> getVirtualStudiesForUser(String username) {
public List<VirtualStudy> getVirtualStudiesAccessibleToUser(String username) {
BasicDBObject basicDBObject = new BasicDBObject();
basicDBObject.put("data.users", username);
ResponseEntity<List<VirtualStudy>> responseEntity = new RestTemplate().exchange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public PublicVirtualStudiesController(
@GetMapping
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = VirtualStudy.class)))
public ResponseEntity<List<VirtualStudy>> getPublicVirtualStudies() {
List<VirtualStudy> virtualStudies = sessionServiceRequestHandler.getVirtualStudiesForUser(ALL_USERS);
List<VirtualStudy> virtualStudies = sessionServiceRequestHandler.getVirtualStudiesAccessibleToUser(ALL_USERS);
return new ResponseEntity<>(virtualStudies, HttpStatus.OK);
}

Expand Down

0 comments on commit 755bc3b

Please sign in to comment.