diff --git a/api/src/app/services/activity.service.ts b/api/src/app/services/activity.service.ts index b1a8178..e4c546f 100644 --- a/api/src/app/services/activity.service.ts +++ b/api/src/app/services/activity.service.ts @@ -8,6 +8,10 @@ import type { Activity, ActivityFeedResponse, ActivityUser, + SuggestionActivity, + LikeActivity, + CommentActivity, + AchievementActivity, } from "@library/shared-types"; import { ACHIEVEMENTS, ActivityType } from "@library/shared-types"; import { prisma } from "../lib/prisma"; @@ -61,7 +65,7 @@ export class ActivityService { limit: number, offset: number, userId?: string - ) { + ): Promise { const where = userId ? { userId, user: { profilePublic: true, isBanned: false } } : { user: { profilePublic: true, isBanned: false } }; @@ -104,7 +108,7 @@ export class ActivityService { limit: number, offset: number, userId?: string - ) { + ): Promise { const where = userId ? { userId, user: { profilePublic: true, isBanned: false } } : { user: { profilePublic: true, isBanned: false } }; @@ -131,7 +135,7 @@ export class ActivityService { // For each like, fetch the entity title const likesWithTitles = await Promise.all( - likes.map(async (like) => { + likes.map(async (like): Promise => { const entityTitle = await this.getEntityTitle( like.entityType, like.entityId @@ -158,7 +162,7 @@ export class ActivityService { limit: number, offset: number, userId?: string - ) { + ): Promise { const where = userId ? { userId, user: { profilePublic: true, isBanned: false } } : { user: { profilePublic: true, isBanned: false } }; @@ -246,7 +250,7 @@ export class ActivityService { limit: number, offset: number, userId?: string - ) { + ): Promise { const where = userId ? { userId,