Fix getRequestToken

This commit is contained in:
mrcanelas
2024-11-04 20:33:28 -03:00
parent 8924fb5564
commit 47d82fdb84
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{
"projectName": "tmdb-addon",
"lastCommit": "849803b"
"lastCommit": "8924fb5"
}
+3 -3
View File
@@ -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
}
})
}