Skip to content

Commit 829999b

Browse files
authored
Merge pull request #309 from boostcampwm-2022/develop
v0.2.4 배포
2 parents 8d1cc27 + f279a58 commit 829999b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

backend/src/user/user.service.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class UserService {
3737
try {
3838
user = await this.updateUser(lowerUsername, githubToken);
3939
} 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);
4141
}
4242
}
4343
const { totalRank, tierRank } =
@@ -82,11 +82,11 @@ export class UserService {
8282
const utc = updatedUser.scoreHistory[updatedUser.scoreHistory.length - 1].date.getTime();
8383
if (new Date(utc + KR_TIME_DIFF).getDate() === new Date().getDate()) {
8484
updatedUser.scoreHistory.pop();
85-
updatedUser.scoreHistory.push({
86-
date: new Date(),
87-
score: updatedUser.score,
88-
});
8985
}
86+
updatedUser.scoreHistory.push({
87+
date: new Date(),
88+
score: updatedUser.score,
89+
});
9090
if (updatedUser.scoreHistory.length > 1) {
9191
updatedUser.scoreDifference =
9292
updatedUser.score - updatedUser.scoreHistory[updatedUser.scoreHistory.length - 2].score;
@@ -270,7 +270,7 @@ export class UserService {
270270
primaryLanguages: Array.from(languagesScore.keys()).slice(0, 3),
271271
};
272272
} 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);
274274
}
275275
}
276276

0 commit comments

Comments
 (0)