mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-30 19:37:51 +01:00
Clear debug
This commit is contained in:
@@ -73,16 +73,11 @@ export async function regenerateTokens(): Promise<void> {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
console.log(authorization_tokens.status)
|
|
||||||
|
|
||||||
if (authorization_tokens.status === 200) {
|
if (authorization_tokens.status === 200) {
|
||||||
console.log(authorization_tokens.data)
|
|
||||||
console.log(authorization_tokens.data.access_token)
|
|
||||||
await setSpotifyAccount({
|
await setSpotifyAccount({
|
||||||
access_token: authorization_tokens.data.access_token,
|
access_token: authorization_tokens.data.access_token,
|
||||||
refresh_token,
|
refresh_token,
|
||||||
})
|
})
|
||||||
console.log(await getSpotifyAccount())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,9 +92,7 @@ async function RequestWrapper<T = never>(url: string): Promise<AxiosResponse<T>
|
|||||||
request = await axios.get<T>(url, options)
|
request = await axios.get<T>(url, options)
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.log('Error in new Request !')
|
|
||||||
await regenerateTokens()
|
await regenerateTokens()
|
||||||
console.log('token regenerated')
|
|
||||||
request = await axios.get<T>(url, options)
|
request = await axios.get<T>(url, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user