Modif utils pour "require-all" + Fix refresh error
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const axios = require('axios')
|
||||
|
||||
module.exports = async function (access_token) {
|
||||
module.exports = validateToken = (async (access_token) => {
|
||||
return await axios.get('https://id.twitch.tv/oauth2/validate', {
|
||||
headers: {
|
||||
'Authorization': `OAuth ${access_token}`,
|
||||
@@ -10,4 +10,4 @@ module.exports = async function (access_token) {
|
||||
if (response.data.status === '401') return false
|
||||
else return true
|
||||
}).catch(error => { console.log(error.response.data) })
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user