mirror of
https://github.com/Viren070/tmdb-addon.git
synced 2025-12-01 23:18:11 +01:00
Fix getRequestToken
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"projectName": "tmdb-addon",
|
||||
"lastCommit": "849803b"
|
||||
"lastCommit": "8924fb5"
|
||||
}
|
||||
+3
-3
@@ -5,10 +5,10 @@ const moviedb = new MovieDb(process.env.TMDB_API);
|
||||
moviedb.sessionId = '051e2865c49c81d4c010d1506d9adaef033b2e65'
|
||||
|
||||
async function getRequestToken() {
|
||||
return moviedb.requestToken()
|
||||
return axios.get(`https://api.themoviedb.org/3/authentication/token/new?api_key=${process.env.TMDB_API}`)
|
||||
.then(response => {
|
||||
if (response.success) {
|
||||
return response.request_token
|
||||
if (response.data.success) {
|
||||
return response.data.request_token
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user