Commit 7d3fd5c0 authored by Kim, Subin's avatar Kim, Subin
Browse files

movieApi - getfromTm

parent 404e124a
import axios from "axios";
import { baseUrl, TMDBUrl } from "../utils/baseUrl";
const getUpcomingfromTM = async () => {
const { data } = await axios.get(`${TMDBUrl}/upcoming?api_key=${process.env.REACT_APP_TMDB_API_KEY}&language=ko-KR`)
return data.results
const getfromTM = async (category) => {
const response = await axios.get(`${baseUrl}/api/movie/showmovie/${category}`)
return response.data
}
const submit = async (movieId) => {
const { data } = await axios.post(`${baseUrl}/api/movie/${movieId}`)
console.log("data==",data)
console.log("data==", data)
}
const movieApi = {
getUpcomingfromTM,
getfromTM,
submit
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment