We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a25109 commit 76c1758Copy full SHA for 76c1758
models/issue_reaction.go
@@ -34,10 +34,14 @@ type FindReactionsOptions struct {
34
}
35
36
func (opts *FindReactionsOptions) toConds() builder.Cond {
37
+ //If Issue ID is set add to Query
38
var cond = builder.NewCond()
39
if opts.IssueID > 0 {
40
cond = cond.And(builder.Eq{"reaction.issue_id": opts.IssueID})
41
42
+ //If CommentID is > 0 add to Query
43
+ //If it is 0 Query ignore CommentID to select
44
+ //If it is -1 it explicit search of Issue Reactions where CommentID = 0
45
if opts.CommentID > 0 {
46
cond = cond.And(builder.Eq{"reaction.comment_id": opts.CommentID})
47
} else if opts.CommentID == -1 {
0 commit comments