MCPcopy
hub / github.com/apache/answer / UpdateCommentReq

Struct UpdateCommentReq

internal/schema/comment_schema.go:81–98  ·  view source on GitHub ↗

UpdateCommentReq update comment request

Source from the content-addressed store, hash-verified

79
80// UpdateCommentReq update comment request
81type UpdateCommentReq struct {
82 // comment id
83 CommentID string `validate:"required" json:"comment_id"`
84 // original comment content
85 OriginalText string `validate:"required,notblank,gte=2,lte=600" json:"original_text"`
86 // parsed comment content
87 ParsedText string `json:"-"`
88 // user id
89 UserID string `json:"-"`
90 IsAdmin bool `json:"-"`
91
92 // whether user can edit it
93 CanEdit bool `json:"-"`
94
95 // whether user can delete it
96 CaptchaID string `json:"captcha_id"` // captcha_id
97 CaptchaCode string `json:"captcha_code"`
98}
99
100func (req *UpdateCommentReq) Check() (errFields []*validator.FormErrorField, err error) {
101 req.ParsedText = converter.Markdown2HTML(req.OriginalText)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected