Skip to content

Commit

Permalink
[v4] Update project unstar endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed May 23, 2017
1 parent d71800b commit 76ca234
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gitlab/v4/objects.py
Expand Up @@ -2023,10 +2023,10 @@ def unstar(self, **kwargs):
GitlabDeleteError: If the action cannot be done
GitlabConnectionError: If the server cannot be reached.
"""
url = "/projects/%s/star" % self.id
r = self.gitlab._raw_delete(url, **kwargs)
raise_error_from_response(r, GitlabDeleteError, [200, 304])
return Project(self.gitlab, r.json()) if r.status_code == 200 else self
url = "/projects/%s/unstar" % self.id
r = self.gitlab._raw_post(url, **kwargs)
raise_error_from_response(r, GitlabDeleteError, [201, 304])
return Project(self.gitlab, r.json()) if r.status_code == 201 else self

def archive(self, **kwargs):
"""Archive a project.
Expand Down

0 comments on commit 76ca234

Please sign in to comment.