Modif utils pour "require-all" + Fix refresh error

This commit is contained in:
Zachary Guénot
2023-05-11 01:23:54 +02:00
parent 6bc5e67cbc
commit e5526cc908
16 changed files with 39 additions and 50 deletions

View File

@@ -1,4 +1,4 @@
module.exports = async function (client_id, redirect_uri, scope) {
module.exports = oauthGen = (async (client_id, redirect_uri, scope) => {
console.log(scope)
let queries = {
response_type: 'code',
@@ -7,4 +7,4 @@ module.exports = async function (client_id, redirect_uri, scope) {
scope: scope.join('+')
}
return `https://id.twitch.tv/oauth2/authorize?${Object.keys(queries).map(key=>`${key}=${queries[key]}`).join('&')}`
}
})