From 347aa247854ea77bb75d93dbcd289ac395a46748 Mon Sep 17 00:00:00 2001 From: Ulrich Schreiner Date: Wed, 4 Feb 2015 15:13:23 +0100 Subject: [PATCH] remove Printf output and do a real removal of the repository in the datastore --- plugin/remote/gitlab/gitlab.go | 1 - server/handler/repo.go | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/remote/gitlab/gitlab.go b/plugin/remote/gitlab/gitlab.go index 9bbd3ce9..155d0d7f 100644 --- a/plugin/remote/gitlab/gitlab.go +++ b/plugin/remote/gitlab/gitlab.go @@ -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 } diff --git a/server/handler/repo.go b/server/handler/repo.go index 2209cc50..97bd842e 100644 --- a/server/handler/repo.go +++ b/server/handler/repo.go @@ -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