Stringify twitchApiToken response for debug logging
parent
6d559b5fe2
commit
57991dc36a
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue