Skip to content

Commit

Permalink
#27 - Feat: Add Weather Based Recommend controller
Browse files Browse the repository at this point in the history
  • Loading branch information
eun61n00 committed Sep 7, 2023
1 parent 6f0dc23 commit d3f8af2
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.routemaster.api.total.domain.recommend.controller;

import lombok.RequiredArgsConstructor;
import org.routemaster.api.total.domain.recommend.data.TourismClimateIndexItem;
import org.routemaster.api.total.domain.recommend.service.WeatherBasedRecommendService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import java.util.List;

@RestController
@RequestMapping("/recommend/weather-based")
@RequiredArgsConstructor
public class WeatherBasedRecommendRestController {

private final WeatherBasedRecommendService service;

@GetMapping("/tourism-climate-index")
public ResponseEntity<Mono<List<TourismClimateIndexItem>>> getTourismClimateIndex(
@RequestParam(required = false) String date,
@RequestParam(required = false) String day,
@RequestParam(required = false) String cityAreaId
) {
return ResponseEntity.ok(service.getTourismClimateIndex(date, day, cityAreaId));
}
}

0 comments on commit d3f8af2

Please sign in to comment.