fixed broken repo delete
This commit is contained in:
parent
3f443f99a4
commit
3dd218b211
3 changed files with 2 additions and 8 deletions
|
@ -7,9 +7,9 @@
|
||||||
* [Nginx](nginx.md)
|
* [Nginx](nginx.md)
|
||||||
* Remotes
|
* Remotes
|
||||||
* [GitHub](github.md)
|
* [GitHub](github.md)
|
||||||
* [GitLab](gitlab.md)
|
|
||||||
* [Bitbucket](bitbucket.md)
|
* [Bitbucket](bitbucket.md)
|
||||||
* [Gogs](gogs.md)
|
* [Gogs](gogs.md)
|
||||||
|
* [GitLab](gitlab.md)
|
||||||
* Database
|
* Database
|
||||||
* [SQLite](sqlite.md)
|
* [SQLite](sqlite.md)
|
||||||
* [MySQL](mysql.md)
|
* [MySQL](mysql.md)
|
||||||
|
|
|
@ -91,7 +91,6 @@ func (c *Client) ListReposAll(account string) ([]*Repo, error) {
|
||||||
for {
|
for {
|
||||||
resp, err := c.ListRepos(account, &ListOpts{Page: page, PageLen: 100})
|
resp, err := c.ListRepos(account, &ListOpts{Page: page, PageLen: 100})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println(err.Error())
|
|
||||||
return repos, err
|
return repos, err
|
||||||
}
|
}
|
||||||
repos = append(repos, resp.Values...)
|
repos = append(repos, resp.Values...)
|
||||||
|
@ -173,11 +172,6 @@ func (c *Client) do(rawurl, method string, in, out interface{}) error {
|
||||||
err := Error{}
|
err := Error{}
|
||||||
json.NewDecoder(resp.Body).Decode(&err)
|
json.NewDecoder(resp.Body).Decode(&err)
|
||||||
err.Status = resp.StatusCode
|
err.Status = resp.StatusCode
|
||||||
|
|
||||||
instr, _ := json.Marshal(in)
|
|
||||||
println(err.Body.Message)
|
|
||||||
println(string(instr))
|
|
||||||
println(uri.String())
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,5 +57,5 @@ func UpdateRepo(c context.Context, repo *model.Repo) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeleteRepo(c context.Context, repo *model.Repo) error {
|
func DeleteRepo(c context.Context, repo *model.Repo) error {
|
||||||
return FromContext(c).Repos().Update(repo)
|
return FromContext(c).Repos().Delete(repo)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue