article detail page @public
This commit is contained in:
parent
3374eb1ec0
commit
000ebd388a
@ -91,13 +91,18 @@ export class CommentController {
|
||||
}
|
||||
|
||||
@Get('reactions/user')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Public()
|
||||
async getUserReaction(
|
||||
@Request() req: RequestWithUser,
|
||||
@Query('articleId') articleId?: string,
|
||||
@Query('liveBlogId') liveBlogId?: string,
|
||||
@Query('commentId') commentId?: string,
|
||||
): Promise<{ type: string | null }> {
|
||||
// If user is not authenticated, return null
|
||||
if (!req.user?.id) {
|
||||
return { type: null };
|
||||
}
|
||||
|
||||
const reaction = await this.commentService.getUserReaction(
|
||||
req.user.id,
|
||||
articleId,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user