steamutils 1.1.39 → 1.1.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +6 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2296,7 +2296,7 @@ class SteamUser {
2296
2296
  i = MAX_RETRY
2297
2297
  while (result?.data?.success !== true && i--) {
2298
2298
  result = await _self._httpRequest(
2299
- `${this.getMySteamUserProfileURL()}/gcpd/${AppID_CSGO}?ajax=1&tab=${matchHistoryType}&continue_token=${token}&sessionid=${_self._sessionid}`)
2299
+ `${this.getMySteamUserProfileURL()}/gcpd/${AppID_CSGO}?ajax=1&tab=${matchHistoryType}${token ? `&continue_token=${token}` : ''}&sessionid=${_self._sessionid}`)
2300
2300
  }
2301
2301
  if (!result.data) {
2302
2302
  return null
@@ -2483,7 +2483,8 @@ class SteamUser {
2483
2483
  if (!Started_playing_CS_GO || !(Started_playing_CS_GO = moment(Started_playing_CS_GO.replace('GMT', '+00'), `YYYY-MM-DD HH:mm:ss Z`)).isValid()) {
2484
2484
  Started_playing_CS_GO = null
2485
2485
  }
2486
- for (const matchHistoryType of matchHistoryTypes) {
2486
+
2487
+ await Promise.all(matchHistoryTypes.map(async (matchHistoryType) => {
2487
2488
  results[matchHistoryType] = await this._getFullHistoryMatches({
2488
2489
  matchHistoryType,
2489
2490
  cbOnMatch,
@@ -2492,7 +2493,8 @@ class SteamUser {
2492
2493
  Started_playing_CS_GO,
2493
2494
  shouldStop,
2494
2495
  })
2495
- }
2496
+ }))
2497
+
2496
2498
  return results
2497
2499
  }
2498
2500
 
@@ -2511,7 +2513,7 @@ class SteamUser {
2511
2513
  const matches = []
2512
2514
 
2513
2515
  do {
2514
- result = await (page++ ? this._getHistoryMatches(matchHistoryType, result?.continue_token) : this.getMatchHistory_initial(matchHistoryType))
2516
+ result = await this._getHistoryMatches(matchHistoryType, result?.continue_token)
2515
2517
  stop = shouldStop({
2516
2518
  maxPage,
2517
2519
  currentPage: page,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "main":"index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",