From 755bc3b05d167440ed906e2c0d4e9ffa695ba00c Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 2 Jul 2024 16:21:08 +0200 Subject: [PATCH] Improve name and docs of method to retrieve VS for user --- .../service/util/SessionServiceRequestHandler.java | 6 +++--- .../org/cbioportal/web/PublicVirtualStudiesController.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/cbioportal/service/util/SessionServiceRequestHandler.java b/src/main/java/org/cbioportal/service/util/SessionServiceRequestHandler.java index a6e1c317234..af9749ee052 100644 --- a/src/main/java/org/cbioportal/service/util/SessionServiceRequestHandler.java +++ b/src/main/java/org/cbioportal/service/util/SessionServiceRequestHandler.java @@ -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 getVirtualStudiesForUser(String username) { + public List getVirtualStudiesAccessibleToUser(String username) { BasicDBObject basicDBObject = new BasicDBObject(); basicDBObject.put("data.users", username); ResponseEntity> responseEntity = new RestTemplate().exchange( diff --git a/src/main/java/org/cbioportal/web/PublicVirtualStudiesController.java b/src/main/java/org/cbioportal/web/PublicVirtualStudiesController.java index 8189b9ad845..cc8fe356748 100644 --- a/src/main/java/org/cbioportal/web/PublicVirtualStudiesController.java +++ b/src/main/java/org/cbioportal/web/PublicVirtualStudiesController.java @@ -53,7 +53,7 @@ public PublicVirtualStudiesController( @GetMapping @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = VirtualStudy.class))) public ResponseEntity> getPublicVirtualStudies() { - List virtualStudies = sessionServiceRequestHandler.getVirtualStudiesForUser(ALL_USERS); + List virtualStudies = sessionServiceRequestHandler.getVirtualStudiesAccessibleToUser(ALL_USERS); return new ResponseEntity<>(virtualStudies, HttpStatus.OK); }