From eb8edec1166bcaccfbbcff28c3aa9e0ccf5c7f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Thor=C3=A9n?= Date: Fri, 10 Nov 2017 21:37:53 +0000 Subject: [PATCH] Add repo-name to DB; better logging for failed repo add --- src/clj/commiteth/routes/webhooks.clj | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/clj/commiteth/routes/webhooks.clj b/src/clj/commiteth/routes/webhooks.clj index 4ab2c42..482c4bd 100644 --- a/src/clj/commiteth/routes/webhooks.clj +++ b/src/clj/commiteth/routes/webhooks.clj @@ -263,20 +263,22 @@ :full-repo full-repo :can-create? can-create?})) (cond (not can-create?) - {:status 400 - :body "Please join our Riot - chat.status.im/#/register and request - access in our #openbounty room to have your account whitelisted"} + (do (log/info "handle-add-repo user not in whitelist: " username) + {:status 400 + :body "Please join our Riot - chat.status.im/#/register and request + access in our #openbounty room to have your account whitelisted"}) (empty? (:address db-user)) - {:status 400 - :body "Please add your ethereum address to your profile first"} + (do (log/info "handle-add-repo user lacking ethereum address: " (pr-str db-user)) + {:status 400 + :body "Please add your ethereum address to your profile first"}) :else (try (let [_ (log/info "handle-add-repo pre-create") db-item (repositories/create {:id repo-id ;; XXX: Being rename twice... silly. - :name repo ;; XXX: Is this name of repo? + :name repo-name ;; XXX: Is this name of repo? :owner-avatar-url owner-avatar-url :user_id user-id :owner owner})