From fbae9e3aae9c01f448cbc25fb7cd3a74c012bf3a Mon Sep 17 00:00:00 2001 From: lunny Date: Sat, 15 Jun 2019 01:42:23 +0000 Subject: [PATCH] fix wrong url for edit and delete team API (#178) --- gitea/org_team.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gitea/org_team.go b/gitea/org_team.go index 2273f9b..1a10254 100644 --- a/gitea/org_team.go +++ b/gitea/org_team.go @@ -44,18 +44,18 @@ func (c *Client) CreateTeam(org string, opt structs.CreateTeamOption) (*Team, er } // EditTeam edits a team of an organization -func (c *Client) EditTeam(org string, id int64, opt structs.EditTeamOption) error { +func (c *Client) EditTeam(id int64, opt structs.EditTeamOption) error { body, err := json.Marshal(&opt) if err != nil { return err } - _, err = c.getResponse("PATCH", fmt.Sprintf("/orgs/%s/teams/%d", org, id), jsonHeader, bytes.NewReader(body)) + _, err = c.getResponse("PATCH", fmt.Sprintf("/teams/%d", id), jsonHeader, bytes.NewReader(body)) return err } // DeleteTeam deletes a team of an organization -func (c *Client) DeleteTeam(org string, id int64) error { - _, err := c.getResponse("DELETE", fmt.Sprintf("/orgs/%s/teams/%d", org, id), nil, nil) +func (c *Client) DeleteTeam(id int64) error { + _, err := c.getResponse("DELETE", fmt.Sprintf("/teams/%d", id), nil, nil) return err }