Optimization: only provide needed repo map keys

This commit is contained in:
Teemu Patja 2017-01-28 09:12:08 +02:00
parent a4aafa1bd3
commit 8812157789
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@
(GET "/user/repositories" []
:auth-rules authenticated?
:current-user user
(ok {:repositories (github/list-repos (:token user))}))
(ok {:repositories (->> (github/list-repos (:token user))
(map #(select-keys %
[:id :html_url :name :full_name :description])))}))
(GET "/repositories" []
:auth-rules authenticated?
:current-user user