mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 02:56:22 +00:00
Refactor comment components and update OIDC configuration
- Updated OIDC configuration to include additional fields in the UpdateOidcConfig method. - Enhanced CommentService to include IsPrivate field in the comment DTO. - Refactored comment components: renamed neo-comment to comment, and moved related files. - Implemented new CommentInput and CommentItem components for better structure and readability. - Removed obsolete files related to the old comment system. - Added CSS animations for comment components to improve user experience.
This commit is contained in:
@ -110,7 +110,7 @@ func (cr *CommentRepo) UpdateComment(comment *model.Comment) error {
|
||||
return errs.New(http.StatusBadRequest, "invalid comment ID", nil)
|
||||
}
|
||||
|
||||
if err := GetDB().Updates(comment).Error; err != nil {
|
||||
if err := GetDB().Select("IsPrivate", "Content").Updates(comment).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -204,6 +204,7 @@ func (cr *CommentRepo) ListComments(currentUserID, targetID, commentID uint, tar
|
||||
} else {
|
||||
query = query.Where("target_id = ? AND target_type = ?", targetID, targetType)
|
||||
}
|
||||
|
||||
items, _, err := PaginateQuery[model.Comment](query, page, size, orderBy, desc)
|
||||
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user