mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-11 10:05:27 +00:00
remove Printf output and do a real removal of the repository in the datastore
This commit is contained in:
parent
0ed7ae7e3f
commit
347aa24785
2 changed files with 5 additions and 1 deletions
|
@ -193,7 +193,6 @@ func (r *Gitlab) Deactivate(user *model.User, repo *model.Repo, link string) err
|
||||||
var pubkey = strings.TrimSpace(repo.PublicKey)
|
var pubkey = strings.TrimSpace(repo.PublicKey)
|
||||||
for _, k := range keys {
|
for _, k := range keys {
|
||||||
if pubkey == strings.TrimSpace(k.Key) {
|
if pubkey == strings.TrimSpace(k.Key) {
|
||||||
fmt.Printf("remove deploy key: %+v\n", k)
|
|
||||||
if err := client.RemoveProjectDeployKey(path, strconv.Itoa(k.Id)); err != nil {
|
if err := client.RemoveProjectDeployKey(path, strconv.Itoa(k.Id)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,11 @@ func DelRepo(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := datastore.DelRepo(ctx, repo); err != nil {
|
||||||
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable everything
|
// disable everything
|
||||||
|
|
Loading…
Reference in a new issue