article detail page @public

This commit is contained in:
echo 2026-02-05 00:10:23 +01:00
parent 3374eb1ec0
commit 000ebd388a

View File

@ -91,13 +91,18 @@ export class CommentController {
} }
@Get('reactions/user') @Get('reactions/user')
@UseGuards(JwtAuthGuard) @Public()
async getUserReaction( async getUserReaction(
@Request() req: RequestWithUser, @Request() req: RequestWithUser,
@Query('articleId') articleId?: string, @Query('articleId') articleId?: string,
@Query('liveBlogId') liveBlogId?: string, @Query('liveBlogId') liveBlogId?: string,
@Query('commentId') commentId?: string, @Query('commentId') commentId?: string,
): Promise<{ type: string | null }> { ): Promise<{ type: string | null }> {
// If user is not authenticated, return null
if (!req.user?.id) {
return { type: null };
}
const reaction = await this.commentService.getUserReaction( const reaction = await this.commentService.getUserReaction(
req.user.id, req.user.id,
articleId, articleId,