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)
|
||||
for _, k := range keys {
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -81,6 +81,11 @@ func DelRepo(c web.C, w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
if err := datastore.DelRepo(ctx, repo); err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// disable everything
|
||||
|
|
Loading…
Reference in a new issue