mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-27 10:50:33 +00:00
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)
|
||||
* Remotes
|
||||
* [GitHub](github.md)
|
||||
* [GitLab](gitlab.md)
|
||||
* [Bitbucket](bitbucket.md)
|
||||
* [Gogs](gogs.md)
|
||||
* [GitLab](gitlab.md)
|
||||
* Database
|
||||
* [SQLite](sqlite.md)
|
||||
* [MySQL](mysql.md)
|
||||
|
|
|
@ -91,7 +91,6 @@ func (c *Client) ListReposAll(account string) ([]*Repo, error) {
|
|||
for {
|
||||
resp, err := c.ListRepos(account, &ListOpts{Page: page, PageLen: 100})
|
||||
if err != nil {
|
||||
println(err.Error())
|
||||
return repos, err
|
||||
}
|
||||
repos = append(repos, resp.Values...)
|
||||
|
@ -173,11 +172,6 @@ func (c *Client) do(rawurl, method string, in, out interface{}) error {
|
|||
err := Error{}
|
||||
json.NewDecoder(resp.Body).Decode(&err)
|
||||
err.Status = resp.StatusCode
|
||||
|
||||
instr, _ := json.Marshal(in)
|
||||
println(err.Body.Message)
|
||||
println(string(instr))
|
||||
println(uri.String())
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -57,5 +57,5 @@ func UpdateRepo(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