-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #338 from boostcampwm-2022/develop
v0.2.6 배포
- Loading branch information
Showing
48 changed files
with
559 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { logger } from '@libs/utils'; | ||
import { Injectable, OnApplicationBootstrap } from '@nestjs/common'; | ||
import { UserRepository } from './user/user.repository'; | ||
|
||
@Injectable() | ||
export class AppService { | ||
getHello(): string { | ||
return 'Hello World!'; | ||
export class AppService implements OnApplicationBootstrap { | ||
constructor(private readonly userRepository: UserRepository) {} | ||
|
||
async onApplicationBootstrap() { | ||
const allUsers = await this.userRepository.findAll({}, false, ['lowerUsername', 'score', 'tier', 'history']); | ||
await Promise.all( | ||
allUsers | ||
.filter((user) => user.history) | ||
.map(({ lowerUsername, score, tier }) => this.userRepository.updateCachedUserRank(tier, score, lowerUsername)), | ||
); | ||
logger.log('all user score loaded in Redis.'); | ||
} | ||
|
||
healthCheck(): string { | ||
return 'devrank server is listening!'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ import { | |
Controller, | ||
DefaultValuePipe, | ||
Get, | ||
NotFoundException, | ||
Param, | ||
ParseIntPipe, | ||
Patch, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"404-information": "An unexpected error has occurred. Please try again later." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"current-score": "Current score", | ||
"register-wakatime-api-key": "Register Wakatime API Key", | ||
"register-wakatime-button-label": "Register", | ||
"maximum-continuous-commit-history": "Maximum continuous commit history", | ||
"user-update-delay": "You can update it in", | ||
"user-update-delay": "You can update it in <count>{{count}}</count> seconds", | ||
"day": "day", | ||
"total": "Total", | ||
"rank": "Rank", | ||
"total-rank_one": "Total: {{count}}st", | ||
"total-rank_two": "Total: {{count}}nd", | ||
"total-rank_few": "Total: {{count}}rd", | ||
"total-rank_other": "Total: {{count}}th", | ||
"tier-rank_one": "<tier>{{tier}}</tier>: {{count}}st", | ||
"tier-rank_two": "<tier>$t(tier:{{tier}})</tier>: {{count}}nd", | ||
"tier-rank_few": "<tier>$t(tier:{{tier}})</tier>: {{count}}rd", | ||
"tier-rank_other": "<tier>$t(tier:{{tier}})</tier>: {{count}}th", | ||
"invalid-user": "This user cannot get information", | ||
"invalid-rank": "Unable to get the rank" | ||
} |
Oops, something went wrong.