Skip to content

Commit

Permalink
fix: sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BettyB979 committed Feb 27, 2024
1 parent ac22520 commit d053dc1
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Slf4j
@RestController
Expand Down Expand Up @@ -51,7 +48,7 @@ public ResponseEntity<List<PeriodDto>> getPeriods() {

@Operation(summary = "Search for periods of a periodicity")
@GetMapping(value = Constants.API_PERIODICITIES_ID_PERIODS, produces = "application/json")
public ResponseEntity<List<PeriodDto>> getPeriodsOfPeriodicity(String periodicity) {
public ResponseEntity<List<PeriodDto>> getPeriodsOfPeriodicity(@PathVariable("periodicity") String periodicity) {
try {
PeriodicityEnum.valueOf(periodicity);
List<PeriodDto> periods = new ArrayList<>();
Expand Down

0 comments on commit d053dc1

Please sign in to comment.