Skip to content

Commit

Permalink
Merge pull request #309 from boostcampwm-2022/develop
Browse files Browse the repository at this point in the history
v0.2.4 배포
  • Loading branch information
wkddntjr1123 authored Dec 13, 2022
2 parents 8d1cc27 + f279a58 commit 829999b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class UserService {
try {
user = await this.updateUser(lowerUsername, githubToken);
} catch {
throw new HttpException(`can't update this user.`, HttpStatus.SERVICE_UNAVAILABLE);
throw new HttpException(`can't update user ${lowerUsername}.`, HttpStatus.SERVICE_UNAVAILABLE);
}
}
const { totalRank, tierRank } =
Expand Down Expand Up @@ -82,11 +82,11 @@ export class UserService {
const utc = updatedUser.scoreHistory[updatedUser.scoreHistory.length - 1].date.getTime();
if (new Date(utc + KR_TIME_DIFF).getDate() === new Date().getDate()) {
updatedUser.scoreHistory.pop();
updatedUser.scoreHistory.push({
date: new Date(),
score: updatedUser.score,
});
}
updatedUser.scoreHistory.push({
date: new Date(),
score: updatedUser.score,
});
if (updatedUser.scoreHistory.length > 1) {
updatedUser.scoreDifference =
updatedUser.score - updatedUser.scoreHistory[updatedUser.scoreHistory.length - 2].score;
Expand Down Expand Up @@ -270,7 +270,7 @@ export class UserService {
primaryLanguages: Array.from(languagesScore.keys()).slice(0, 3),
};
} catch {
throw new HttpException(`can't update this user.`, HttpStatus.SERVICE_UNAVAILABLE);
throw new HttpException(`can't update user ${lowerUsername}.`, HttpStatus.SERVICE_UNAVAILABLE);
}
}

Expand Down

0 comments on commit 829999b

Please sign in to comment.