@@ -37,7 +37,7 @@ export class UserService {
37
37
try {
38
38
user = await this . updateUser ( lowerUsername , githubToken ) ;
39
39
} catch {
40
- throw new HttpException ( `can't update this user.` , HttpStatus . SERVICE_UNAVAILABLE ) ;
40
+ throw new HttpException ( `can't update user ${ lowerUsername } .` , HttpStatus . SERVICE_UNAVAILABLE ) ;
41
41
}
42
42
}
43
43
const { totalRank, tierRank } =
@@ -82,11 +82,11 @@ export class UserService {
82
82
const utc = updatedUser . scoreHistory [ updatedUser . scoreHistory . length - 1 ] . date . getTime ( ) ;
83
83
if ( new Date ( utc + KR_TIME_DIFF ) . getDate ( ) === new Date ( ) . getDate ( ) ) {
84
84
updatedUser . scoreHistory . pop ( ) ;
85
- updatedUser . scoreHistory . push ( {
86
- date : new Date ( ) ,
87
- score : updatedUser . score ,
88
- } ) ;
89
85
}
86
+ updatedUser . scoreHistory . push ( {
87
+ date : new Date ( ) ,
88
+ score : updatedUser . score ,
89
+ } ) ;
90
90
if ( updatedUser . scoreHistory . length > 1 ) {
91
91
updatedUser . scoreDifference =
92
92
updatedUser . score - updatedUser . scoreHistory [ updatedUser . scoreHistory . length - 2 ] . score ;
@@ -270,7 +270,7 @@ export class UserService {
270
270
primaryLanguages : Array . from ( languagesScore . keys ( ) ) . slice ( 0 , 3 ) ,
271
271
} ;
272
272
} catch {
273
- throw new HttpException ( `can't update this user.` , HttpStatus . SERVICE_UNAVAILABLE ) ;
273
+ throw new HttpException ( `can't update user ${ lowerUsername } .` , HttpStatus . SERVICE_UNAVAILABLE ) ;
274
274
}
275
275
}
276
276
0 commit comments