Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
  • Loading branch information
ayolab committed Oct 22, 2024
1 parent 49f965f commit 4ec33ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.gridsuite.explore.server.dto.*;
import org.gridsuite.explore.server.services.DirectoryService;
import org.gridsuite.explore.server.services.ExploreService;
import org.gridsuite.explore.server.services.SpreadsheetConfigService;
import org.gridsuite.explore.server.utils.ContingencyListType;
import org.gridsuite.explore.server.utils.ParametersType;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -43,10 +44,12 @@ public class ExploreController {

private final ExploreService exploreService;
private final DirectoryService directoryService;
private final SpreadsheetConfigService spreadsheetConfigService;

public ExploreController(ExploreService exploreService, DirectoryService directoryService) {
public ExploreController(ExploreService exploreService, DirectoryService directoryService, SpreadsheetConfigService spreadsheetConfigService) {
this.exploreService = exploreService;
this.directoryService = directoryService;
this.spreadsheetConfigService = spreadsheetConfigService;
}

@PostMapping(value = "/explore/studies/{studyName}/cases/{caseUuid}")
Expand Down Expand Up @@ -343,7 +346,7 @@ public ResponseEntity<Void> duplicateSpreadsheetConfig(@RequestParam("duplicateF
@Operation(summary = "Get a spreadsheet configuration")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Spreadsheet config retrieved")})
public ResponseEntity<String> getSpreadsheetConfig(@PathVariable UUID id) {
return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(exploreService.getSpreadsheetConfig(id));
return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(spreadsheetConfigService.getSpreadsheetConfig(id));
}

@PostMapping(value = "/explore/composite-modifications")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ public void duplicateSpreadsheetConfig(UUID sourceId, UUID targetDirectoryId, St
directoryService.duplicateElement(sourceId, newSpreadsheetConfigUuid, targetDirectoryId, userId);
}

public String getSpreadsheetConfig(UUID configUuid) {
return spreadsheetConfigService.getSpreadsheetConfig(configUuid);
}

public void createCompositeModifications(List<UUID> modificationUuids, String userId, String name,
String description, UUID parentDirectoryUuid) {

Expand Down

0 comments on commit 4ec33ee

Please sign in to comment.