diff --git a/packages/backend/src/core/FeaturedService.ts b/packages/backend/src/core/FeaturedService.ts index 5963b7fc39..e8a08cd866 100644 --- a/packages/backend/src/core/FeaturedService.ts +++ b/packages/backend/src/core/FeaturedService.ts @@ -19,12 +19,6 @@ export class FeaturedService { ) { } - @bindThis - private getCurrentPerUserFriendRankingWindow(): number { - const passed = new Date().getTime() - new Date(new Date().getFullYear(), 0, 1).getTime(); - return Math.floor(passed / (1000 * 60 * 60 * 24 * 7)); // 1週間ごと - } - @bindThis private getCurrentWindow(windowRange: number): number { const passed = new Date().getTime() - new Date(new Date().getFullYear(), 0, 1).getTime(); @@ -79,22 +73,22 @@ export class FeaturedService { } @bindThis - public async updateGlobalNotesRanking(noteId: MiNote['id'], score = 1): Promise { + public updateGlobalNotesRanking(noteId: MiNote['id'], score = 1): Promise { return this.updateRankingOf('featuredGlobalNotesRanking', GLOBAL_NOTES_RANKING_WINDOW, noteId, score); } @bindThis - public async updateInChannelNotesRanking(noteId: MiNote['id'], channelId: MiNote['channelId'], score = 1): Promise { + public updateInChannelNotesRanking(noteId: MiNote['id'], channelId: MiNote['channelId'], score = 1): Promise { return this.updateRankingOf(`featuredInChannelNotesRanking:${channelId}`, GLOBAL_NOTES_RANKING_WINDOW, noteId, score); } @bindThis - public async getGlobalNotesRanking(limit: number): Promise { + public getGlobalNotesRanking(limit: number): Promise { return this.getRankingOf('featuredGlobalNotesRanking', GLOBAL_NOTES_RANKING_WINDOW, limit); } @bindThis - public async getInChannelNotesRanking(channelId: MiNote['channelId'], limit: number): Promise { + public getInChannelNotesRanking(channelId: MiNote['channelId'], limit: number): Promise { return this.getRankingOf(`featuredInChannelNotesRanking:${channelId}`, GLOBAL_NOTES_RANKING_WINDOW, limit); } }