@@ -57,7 +57,7 @@ const extraHeaders = {
57
57
58
58
export async function loadVersion ( ) {
59
59
try {
60
- const res = await axios ( {
60
+ const res = await axios . request ( {
61
61
url : "https://valorant-api.com/v1/version" ,
62
62
method : "GET" ,
63
63
} ) ;
@@ -69,7 +69,7 @@ export async function loadVersion() {
69
69
}
70
70
71
71
export async function loadSkins ( ) {
72
- const res2 = await axios ( {
72
+ const res2 = await axios . request ( {
73
73
url : `https://valorant-api.com/v1/weapons/skins?language=${ getVAPILang ( ) } ` ,
74
74
method : "GET" ,
75
75
} ) ;
@@ -78,7 +78,7 @@ export async function loadSkins() {
78
78
}
79
79
80
80
export async function getEntitlementsToken ( accessToken : string ) {
81
- const res = await axios ( {
81
+ const res = await axios . request ( {
82
82
url : getUrl ( "entitlements" ) ,
83
83
method : "POST" ,
84
84
headers : {
@@ -104,7 +104,7 @@ export async function getUsername(
104
104
userId : string ,
105
105
region : string ,
106
106
) {
107
- const res = await axios ( {
107
+ const res = await axios . request ( {
108
108
url : getUrl ( "name" , region ) ,
109
109
method : "PUT" ,
110
110
headers : {
@@ -124,7 +124,7 @@ export async function loadOffers(
124
124
entitlementsToken : string ,
125
125
region : string ,
126
126
) {
127
- const res = await axios ( {
127
+ const res = await axios . request ( {
128
128
url : getUrl ( "offers" , region ) ,
129
129
method : "GET" ,
130
130
headers : {
@@ -167,7 +167,7 @@ export async function parseShop(shop: IStorefrontV3) {
167
167
let main : IShopItem [ ] = [ ] ;
168
168
for ( var i = 0 ; i < singleItemOffers . length ; i ++ ) {
169
169
const skin = skins . find (
170
- ( skin ) => skin . levels [ 0 ] . uuid == singleItemOffers [ i ] ,
170
+ ( _skin ) => _skin . levels [ 0 ] . uuid == singleItemOffers [ i ] ,
171
171
) as ISkin ;
172
172
173
173
main [ i ] = {
@@ -183,7 +183,7 @@ export async function parseShop(shop: IStorefrontV3) {
183
183
184
184
bundles [ i ] = {
185
185
...(
186
- await axios ( {
186
+ await axios . request ( {
187
187
url : `https://valorant-api.com/v1/bundles/${
188
188
bundle . DataAssetID
189
189
} ?language=${ getVAPILang ( ) } `,
@@ -197,7 +197,7 @@ export async function parseShop(shop: IStorefrontV3) {
197
197
( item : any ) => item . Item . ItemTypeID === VItemTypes . SkinLevel ,
198
198
) . map ( ( item : any ) => {
199
199
const skin = skins . find (
200
- ( skin ) => skin . levels [ 0 ] . uuid === item . Item . ItemID ,
200
+ ( _skin ) => _skin . levels [ 0 ] . uuid === item . Item . ItemID ,
201
201
) as ISkin ;
202
202
203
203
return {
@@ -215,7 +215,7 @@ export async function parseShop(shop: IStorefrontV3) {
215
215
for ( var i = 0 ; i < bonusStore . length ; i ++ ) {
216
216
let itemid = bonusStore [ i ] . Offer . Rewards [ 0 ] . ItemID ;
217
217
const skin = skins . find (
218
- ( skin ) => skin . levels [ 0 ] . uuid === itemid ,
218
+ ( _skin ) => _skin . levels [ 0 ] . uuid === itemid ,
219
219
) as ISkin ;
220
220
221
221
nightMarket [ i ] = {
@@ -248,7 +248,7 @@ export async function getBalances(
248
248
region : string ,
249
249
userId : string ,
250
250
) {
251
- const res = await axios ( {
251
+ const res = await axios . request ( {
252
252
url : getUrl ( "wallet" , region , userId ) ,
253
253
method : "GET" ,
254
254
headers : {
@@ -271,7 +271,7 @@ export async function getProgress(
271
271
region : string ,
272
272
userId : string ,
273
273
) {
274
- const res = await axios ( {
274
+ const res = await axios . request ( {
275
275
url : getUrl ( "playerxp" , region , userId ) ,
276
276
method : "GET" ,
277
277
headers : {
@@ -288,7 +288,7 @@ export async function getProgress(
288
288
}
289
289
290
290
export const reAuth = ( ) =>
291
- axios ( {
291
+ axios . request ( {
292
292
url : "https://auth.riotgames.com/api/v1/authorization" ,
293
293
method : "POST" ,
294
294
headers : {
0 commit comments