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 (client_id, access_token) {
|
||||
module.exports = getUserInfo = (async (client_id, access_token) => {
|
||||
return await axios.get(`https://api.twitch.tv/helix/users`, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${access_token}`,
|
||||
@@ -10,4 +10,4 @@ module.exports = async function (client_id, access_token) {
|
||||
//console.log(response.data)
|
||||
return response.data.data[0]
|
||||
}).catch(error => { console.log(error.response.data) })
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user