From 88121577893dc78abfd0e12f49ebd5ccc558ee46 Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Sat, 28 Jan 2017 09:12:08 +0200 Subject: [PATCH] Optimization: only provide needed repo map keys --- src/clj/commiteth/routes/services.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clj/commiteth/routes/services.clj b/src/clj/commiteth/routes/services.clj index c636671..ae1d981 100644 --- a/src/clj/commiteth/routes/services.clj +++ b/src/clj/commiteth/routes/services.clj @@ -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