Add repo-name to DB; better logging for failed repo add
This commit is contained in:
parent
764f60edcb
commit
eb8edec116
|
@ -263,20 +263,22 @@
|
||||||
:full-repo full-repo
|
:full-repo full-repo
|
||||||
:can-create? can-create?}))
|
:can-create? can-create?}))
|
||||||
(cond (not can-create?)
|
(cond (not can-create?)
|
||||||
|
(do (log/info "handle-add-repo user not in whitelist: " username)
|
||||||
{:status 400
|
{:status 400
|
||||||
:body "Please join our Riot - chat.status.im/#/register and request
|
:body "Please join our Riot - chat.status.im/#/register and request
|
||||||
access in our #openbounty room to have your account whitelisted"}
|
access in our #openbounty room to have your account whitelisted"})
|
||||||
|
|
||||||
(empty? (:address db-user))
|
(empty? (:address db-user))
|
||||||
|
(do (log/info "handle-add-repo user lacking ethereum address: " (pr-str db-user))
|
||||||
{:status 400
|
{:status 400
|
||||||
:body "Please add your ethereum address to your profile first"}
|
:body "Please add your ethereum address to your profile first"})
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(try
|
(try
|
||||||
(let [_ (log/info "handle-add-repo pre-create")
|
(let [_ (log/info "handle-add-repo pre-create")
|
||||||
db-item (repositories/create
|
db-item (repositories/create
|
||||||
{:id repo-id ;; XXX: Being rename twice... silly.
|
{: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
|
:owner-avatar-url owner-avatar-url
|
||||||
:user_id user-id
|
:user_id user-id
|
||||||
:owner owner})
|
:owner owner})
|
||||||
|
|
Loading…
Reference in New Issue