Stringify twitchApiToken response for debug logging

master
Dessa Simpson 2020-11-29 14:13:26 -07:00
parent 6d559b5fe2
commit 57991dc36a
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ async function refreshApiToken(tokens: TokenPair): Promise<boolean> {
if (res.status == 200) { if (res.status == 200) {
log(LogLevel.INFO,"twitch.refreshApiToken: Refresh returned success."); log(LogLevel.INFO,"twitch.refreshApiToken: Refresh returned success.");
var data = await (res.json() as Promise<TokenPair>); var data = await (res.json() as Promise<TokenPair>);
log(LogLevel.DEBUG, "Returned data:") log(LogLevel.DEBUG, "Returned data:");
log(LogLevel.DEBUG, data) log(LogLevel.DEBUG, JSON.stringify(data,null,2));
tokens.access_token = data.access_token; tokens.access_token = data.access_token;
tokens.refresh_token = data.refresh_token; tokens.refresh_token = data.refresh_token;
return true; return true;