A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(comment): add comment original text notblank condition
LinkinStarb7356ba87520
diff --git a/internal/schema/comment_schema.go b/internal/schema/comment_schema.goindex 7648ff12..dcc44bd5 100644--- a/internal/schema/comment_schema.go+++ b/internal/schema/comment_schema.go@@ -14,7 +14,7 @@ type AddCommentReq struct {// reply comment idReplyCommentID string `validate:"omitempty" json:"reply_comment_id"`// original comment content- OriginalText string `validate:"required,gte=2,lte=600" json:"original_text"`+ OriginalText string `validate:"required,notblank,gte=2,lte=600" json:"original_text"`// parsed comment contentParsedText string `json:"-"`// @ user id list@@ -47,7 +47,7 @@ type UpdateCommentReq struct {// comment idCommentID string `validate:"required" json:"comment_id"`// original comment content- OriginalText string `validate:"required,gte=2,lte=600" json:"original_text"`+ OriginalText string `validate:"required,notblank,gte=2,lte=600" json:"original_text"`// parsed comment contentParsedText string `json:"-"`// user id