Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
butter-studio
Commits
7d3fd5c0
Commit
7d3fd5c0
authored
Jul 19, 2021
by
Kim, Subin
Browse files
movieApi - getfromTm
parent
404e124a
Changes
1
Show whitespace changes
Inline
Side-by-side
client/src/apis/movie.api.js
View file @
7d3fd5c0
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
{
baseUrl
,
TMDBUrl
}
from
"
../utils/baseUrl
"
;
import
{
baseUrl
,
TMDBUrl
}
from
"
../utils/baseUrl
"
;
const
get
Upcoming
fromTM
=
async
()
=>
{
const
getfromTM
=
async
(
category
)
=>
{
const
{
data
}
=
await
axios
.
get
(
`
${
TMDB
Url
}
/
upcoming?api_key=
${
process
.
env
.
REACT_APP_TMDB_API_KEY
}
&language=ko-KR
`
)
const
response
=
await
axios
.
get
(
`
${
base
Url
}
/
api/movie/showmovie/
${
category
}
`
)
return
data
.
results
return
response
.
data
}
}
const
submit
=
async
(
movieId
)
=>
{
const
submit
=
async
(
movieId
)
=>
{
const
{
data
}
=
await
axios
.
post
(
`
${
baseUrl
}
/api/movie/
${
movieId
}
`
)
const
{
data
}
=
await
axios
.
post
(
`
${
baseUrl
}
/api/movie/
${
movieId
}
`
)
console
.
log
(
"
data==
"
,
data
)
console
.
log
(
"
data==
"
,
data
)
}
}
const
movieApi
=
{
const
movieApi
=
{
get
Upcoming
fromTM
,
getfromTM
,
submit
submit
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment