Skip to content

Commit 7229791

Browse files
committed
feat(api): include reaction names in query
1 parent 8c4ff86 commit 7229791

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export class BlogPostReactionDetails {
22
count!: number;
33
currentProfileReactionId?: string;
4+
names!: string[];
45
}

services/api/src/features/blogs/application/handlers/query-handlers/get-blog-post-list.handler.ts

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class GetBlogPostListHandler
104104
currentProfileReactionId: post.reactions.find(
105105
(reaction) => reaction.profileId === currentProfileId,
106106
)?.id,
107+
names: post.reactions.map((reaction) => reaction.profile.name),
107108
}),
108109
}));
109110
}

services/api/src/features/blogs/application/handlers/query-handlers/get-blog-post.handler.ts

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export class GetBlogPostHandler
103103
currentProfileReactionId: blogPost.reactions.find(
104104
(reaction) => reaction.profileId === currentProfileId,
105105
)?.id,
106+
names: blogPost.reactions.map((reaction) => reaction.profile.name),
106107
}),
107108
});
108109
}

0 commit comments

Comments
 (0)