@@ -35,6 +35,7 @@ import FinishedMatchEntity from 'gameserver/model/finished-match.entity';
35
35
import { makePage } from 'gateway/util/make-page' ;
36
36
import { ProcessRankedMatchHandler } from 'gameserver/command/ProcessRankedMatch/process-ranked-match.handler' ;
37
37
import { AchievementKey } from 'gateway/shared-types/achievemen-key' ;
38
+ import { measure } from 'util/measure' ;
38
39
39
40
@Controller ( "player" )
40
41
@ApiTags ( "player" )
@@ -172,8 +173,10 @@ offset $2 limit $3`,
172
173
} ;
173
174
}
174
175
176
+
175
177
@CacheTTL ( 120 )
176
178
@Get ( "/summary/:version/:id" )
179
+ @measure ( "playerSummary" )
177
180
async playerSummary (
178
181
@Param ( "version" ) version : Dota2Version ,
179
182
@Param ( "id" ) steam_id : string ,
@@ -185,36 +188,36 @@ offset $2 limit $3`,
185
188
} ) ;
186
189
187
190
// if it exists in the view, we happy
188
- if ( lb ) {
189
- return {
190
- rank : lb . rank ,
191
-
192
- steam_id : lb . steam_id ,
193
- mmr : lb . mmr ,
194
-
195
- games : lb . games ,
196
- wins : lb . wins ,
197
-
198
- kills : lb . kills ,
199
- deaths : lb . deaths ,
200
- assists : lb . assists ,
201
-
202
- play_time : lb . play_time ,
203
- playedAnyGame : lb . any_games > 0 ,
204
-
205
- hasUnrankedAccess : lb . bot_wins > 0 ,
206
-
207
- newbieUnrankedGamesLeft :
208
- lb . ranked_games > 0
209
- ? 0
210
- : Math . max ( 0 , UNRANKED_GAMES_REQUIRED_FOR_RANKED - lb . games ) ,
211
-
212
- calibrationGamesLeft : Math . max (
213
- ProcessRankedMatchHandler . TOTAL_CALIBRATION_GAMES - lb . ranked_games ,
214
- 0 ,
215
- ) ,
216
- } ;
217
- }
191
+ // if (lb) {
192
+ // return {
193
+ // rank: lb.rank,
194
+ //
195
+ // steam_id: lb.steam_id,
196
+ // mmr: lb.mmr,
197
+ //
198
+ // games: lb.games,
199
+ // wins: lb.wins,
200
+ //
201
+ // kills: lb.kills,
202
+ // deaths: lb.deaths,
203
+ // assists: lb.assists,
204
+ //
205
+ // play_time: lb.play_time,
206
+ // playedAnyGame: lb.any_games > 0,
207
+ //
208
+ // hasUnrankedAccess: lb.bot_wins > 0,
209
+ //
210
+ // newbieUnrankedGamesLeft:
211
+ // lb.ranked_games > 0
212
+ // ? 0
213
+ // : Math.max(0, UNRANKED_GAMES_REQUIRED_FOR_RANKED - lb.games),
214
+ //
215
+ // calibrationGamesLeft: Math.max(
216
+ // ProcessRankedMatchHandler.TOTAL_CALIBRATION_GAMES - lb.ranked_games,
217
+ // 0,
218
+ // ),
219
+ // };
220
+ // }
218
221
219
222
const summary : Summary | undefined =
220
223
await this . playerService . fullSummary ( steam_id ) ;
0 commit comments