Ajout panel + récup infos depuis SQL + fix noms de fichiers

This commit is contained in:
Zachary Guénot
2023-05-10 01:53:55 +02:00
parent 172f811e91
commit de01c981f8
14 changed files with 162 additions and 58 deletions

13
utils/getUserInfo.js Normal file
View File

@@ -0,0 +1,13 @@
const axios = require('axios')
module.exports = async function (client_id, access_token) {
return await axios.get(`https://api.twitch.tv/helix/users`, {
headers: {
'Authorization': `Bearer ${access_token}`,
'Client-Id': client_id
}
}).then(response => {
//console.log(response.data)
return response.data.data[0]
}).catch(error => { console.log(error.response.data) })
}