-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[#68] fix: readme 수정 및 Controller 수정
- Loading branch information
Showing
3 changed files
with
73 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 23 additions & 7 deletions
30
src/main/java/com/hackathonteam2/recomovie/movie/controller/MovieRestController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
package com.hackathonteam2.recomovie.movie.controller; | ||
|
||
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 com.hackathonteam2.recomovie.movie.service.MovieService; | ||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
import com.hackathonteam2.recomovie.movie.dto.NowPlayingResponse; | ||
import com.hackathonteam2.recomovie.movie.dto.TMDBDetailsDto; | ||
import com.hackathonteam2.recomovie.movie.service.TMDBService; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/movie") | ||
@RequestMapping("/tmdb") | ||
public class MovieRestController { | ||
|
||
private final MovieService movieService; | ||
private final TMDBService tmdbService; | ||
|
||
// @GetMapping("/search") | ||
// public List<MovieDto> search(@RequestParam(name = "keyword") String keyword) { | ||
// return movieService.search(keyword); | ||
// } | ||
@GetMapping("/nowPlaying") | ||
public String getNowPlaying(@RequestParam int pageNum) throws JsonProcessingException { | ||
NowPlayingResponse nowPlayingResponse = tmdbService.getNowPlaying(pageNum); | ||
|
||
return "pageName"; | ||
} | ||
|
||
@GetMapping("/details") | ||
public String getDetails(@RequestParam Long movieId) throws JsonProcessingException { | ||
|
||
TMDBDetailsDto tmdbDetailsDto = tmdbService.getDetails(movieId); | ||
|
||
return "test"; | ||
} | ||
} |
38 changes: 0 additions & 38 deletions
38
src/main/java/com/hackathonteam2/recomovie/movie/controller/TMDBRestController.java
This file was deleted.
Oops, something went wrong.