diff options
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/issue_reaction.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/issue_reaction.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/issue_reaction.go b/vendor/code.gitea.io/sdk/gitea/issue_reaction.go index 4ec203c594..b45c066646 100644 --- a/vendor/code.gitea.io/sdk/gitea/issue_reaction.go +++ b/vendor/code.gitea.io/sdk/gitea/issue_reaction.go @@ -20,7 +20,7 @@ type Reaction struct { // GetIssueReactions get a list reactions of an issue func (c *Client) GetIssueReactions(owner, repo string, index int64) ([]*Reaction, *Response, error) { - if err := c.checkServerVersionGreaterThanOrEqual(version1_11_0); err != nil { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, nil, err } reactions := make([]*Reaction, 0, 10) @@ -30,7 +30,7 @@ func (c *Client) GetIssueReactions(owner, repo string, index int64) ([]*Reaction // GetIssueCommentReactions get a list of reactions from a comment of an issue func (c *Client) GetIssueCommentReactions(owner, repo string, commentID int64) ([]*Reaction, *Response, error) { - if err := c.checkServerVersionGreaterThanOrEqual(version1_11_0); err != nil { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, nil, err } reactions := make([]*Reaction, 0, 10) @@ -45,7 +45,7 @@ type editReactionOption struct { // PostIssueReaction add a reaction to an issue func (c *Client) PostIssueReaction(owner, repo string, index int64, reaction string) (*Reaction, *Response, error) { - if err := c.checkServerVersionGreaterThanOrEqual(version1_11_0); err != nil { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, nil, err } reactionResponse := new(Reaction) @@ -61,7 +61,7 @@ func (c *Client) PostIssueReaction(owner, repo string, index int64, reaction str // DeleteIssueReaction remove a reaction from an issue func (c *Client) DeleteIssueReaction(owner, repo string, index int64, reaction string) (*Response, error) { - if err := c.checkServerVersionGreaterThanOrEqual(version1_11_0); err != nil { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, err } body, err := json.Marshal(&editReactionOption{Reaction: reaction}) @@ -74,7 +74,7 @@ func (c *Client) DeleteIssueReaction(owner, repo string, index int64, reaction s // PostIssueCommentReaction add a reaction to a comment of an issue func (c *Client) PostIssueCommentReaction(owner, repo string, commentID int64, reaction string) (*Reaction, *Response, error) { - if err := c.checkServerVersionGreaterThanOrEqual(version1_11_0); err != nil { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, nil, err } reactionResponse := new(Reaction) @@ -90,7 +90,7 @@ func (c *Client) PostIssueCommentReaction(owner, repo string, commentID int64, r // DeleteIssueCommentReaction remove a reaction from a comment of an issue func (c *Client) DeleteIssueCommentReaction(owner, repo string, commentID int64, reaction string) (*Response, error) { - if err := c.checkServerVersionGreaterThanOrEqual(version1_11_0); err != nil { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, err } body, err := json.Marshal(&editReactionOption{Reaction: reaction}) |