Skip to content

Commit

Permalink
fix(api): comment IP data loss after editing (#504)
Browse files Browse the repository at this point in the history
Signed-off-by: qwqcode <[email protected]>
  • Loading branch information
qwqcode authored May 7, 2023
1 parent e9acd28 commit c20faed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/handler/admin_comment_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ func AdminCommentEdit(router fiber.Router) {
comment.PageKey = p.PageKey
}

comment.UA = p.UA
comment.IP = p.IP
if p.UA != "" {
comment.UA = p.UA
}
if p.IP != "" {
comment.IP = p.IP
}

comment.IsCollapsed = p.IsCollapsed
comment.IsPinned = p.IsPinned

Expand Down

0 comments on commit c20faed

Please sign in to comment.