File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,9 @@ export default class Friends {
49
49
: this . bot . client . steamID
50
50
) . getSteamID64 ( )
51
51
} ;
52
- const hasApiKey = ! ! this . bot . manager . apiKey ;
53
- params [ hasApiKey ? 'key' : 'access_token' ] = this . bot . manager [ hasApiKey ? 'apiKey' : 'accessToken' ] ;
52
+
53
+ if ( ! ! this . bot . manager . apiKey ) params . key = this . bot . manager . apiKey ;
54
+ else params . access_token = this . bot . manager . accessToken ;
54
55
55
56
apiRequest < GetBadges > ( {
56
57
method : 'GET' ,
Original file line number Diff line number Diff line change @@ -100,8 +100,9 @@ export default class TF2Inventory {
100
100
private fetch ( ) : Promise < void > {
101
101
return new Promise ( ( resolve , reject ) => {
102
102
const params : SteamRequestParams = { steamid : this . getSteamID . toString ( ) } ;
103
- const hasApiKey = ! ! this . manager . apiKey ;
104
- params [ hasApiKey ? 'key' : 'access_token' ] = this . manager [ hasApiKey ? 'apiKey' : 'accessToken' ] ;
103
+
104
+ if ( ! ! this . manager . apiKey ) params . key = this . manager . apiKey ;
105
+ else params . access_token = this . manager . accessToken ;
105
106
106
107
apiRequest < GetPlayerItems > ( {
107
108
method : 'GET' ,
You can’t perform that action at this time.
0 commit comments