Skip to content

Commit

Permalink
最新评论API添加用户id
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFish-233 committed May 27, 2023
1 parent d3b6685 commit 8c5bdc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -549,12 +549,14 @@ public async Task<ActionResult<List<LatestCommentItemModel>>> ListLatestComments
UserName = item.ApplicationUser.UserName,
Time = item.CommentTime.ToTimeFromNowString(),
Content = _appHelper.MarkdownToHtml(item.Text),
UserImage = _appHelper.GetImagePath(item.ApplicationUser.PhotoPath, "user.png")
UserImage = _appHelper.GetImagePath(item.ApplicationUser.PhotoPath, "user.png"),
UserId=item.ApplicationUserId
});
}

return model;
}

[AllowAnonymous]
[HttpGet]
public async Task<ActionResult<List<HotTagItemModel>>> ListHotTags()
Expand Down
Expand Up @@ -101,6 +101,7 @@ public class LatestCommentItemModel : HomeItemModel
{
public string UserImage { get; set; }
public string UserName { get; set; }
public string UserId { get; set; }

public string Content { get; set; }
public string Time { get; set; }
Expand Down

0 comments on commit 8c5bdc3

Please sign in to comment.