Skip to content

Commit

Permalink
#2 - Feat: Add Area Code Search controller
Browse files Browse the repository at this point in the history
  • Loading branch information
eun61n00 committed Aug 4, 2023
1 parent d00db56 commit 3bf248c
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.routemaster.api.total.domain.attraction.data.utils.AreaCodeSearchResponse;
import org.routemaster.api.total.domain.attraction.data.utils.CategorySearchResponse;
import org.routemaster.api.total.domain.attraction.service.AttractionUtilService;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -85,4 +86,14 @@ public ResponseEntity<Mono<CategorySearchResponse>> searchCategory(
return new ResponseEntity<>(response, HttpStatus.OK);
}

@GetMapping("/areaCode")
ResponseEntity<Mono<AreaCodeSearchResponse>> searchAreaCode(
@RequestParam(required = false) Integer numOfRows,
@RequestParam(required = false) Integer pageNo,
@RequestParam(required = false) Integer areaCode
) {
Mono<AreaCodeSearchResponse> response = service.searchAreaCode(numOfRows, pageNo, areaCode);
return new ResponseEntity<>(response, HttpStatus.OK);
}

}

0 comments on commit 3bf248c

Please sign in to comment.