mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
feat: 添加用户代理字段到评论功能,支持记录用户的用户代理信息
This commit is contained in:
@ -32,6 +32,7 @@ func (cc *CommentController) CreateComment(ctx context.Context, c *app.RequestCo
|
||||
return
|
||||
}
|
||||
req.RemoteAddr = c.RemoteAddr().String()
|
||||
req.UserAgent = string(c.UserAgent())
|
||||
commentID, err := cc.service.CreateComment(ctx, &req)
|
||||
if err != nil {
|
||||
serviceErr := errs.AsServiceError(err)
|
||||
|
Reference in New Issue
Block a user