File tree Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 2121
2222 [{:keys [ds user query-params] :as _request}]
2323 (let [{:keys [n mindate maxdate top contenttype]} (w/keywordize-keys query-params)
24- top-field (if (= top " post" ) :post-id :bundle-id )]
25- ( res/response ( set/rename-keys
26- ( analytics/top-statistics-query ds mindate maxdate n top-field { :creator- id ( :id user)
27- :content-type-id contenttype})
28- {top-field :top }))))
24+ top-field (if (= top " post" ) :post-id :bundle-id )
25+ results ( analytics/top-statistics-query ds mindate maxdate n top-field { :creator-id ( :id user)
26+ :content-type- id contenttype})]
27+ ( res/response ( mapv ( fn [result]
28+ ( set/rename-keys result {top-field :top })) results ))))
Original file line number Diff line number Diff line change 2121
2222 [{:keys [ds user query-params] :as _request}]
2323 (let [{:keys [n mindate maxdate top contenttype]} (w/keywordize-keys query-params)
24- top-field (if (= top " post" ) :post-id :feed-id )]
25- ( res/response ( set/rename-keys
26- ( analytics/top-statistics-query ds mindate maxdate n top-field { :distributor- id ( :id user)
27- :content-type-id contenttype})
28- {top-field :top }))))
24+ top-field (if (= top " post" ) :post-id :feed-id )
25+ results ( analytics/top-statistics-query ds mindate maxdate n top-field { :distributor-id ( :id user)
26+ :content-type- id contenttype})]
27+ ( res/response ( mapv ( fn [result]
28+ ( set/rename-keys result {top-field :top })) results ))))
Original file line number Diff line number Diff line change 233233 [" /bundle" {:middleware [[mw/apply-bundle]]}
234234 [" /posts"
235235 [" /:id"
236- [" /views" (route {:post analytics-bundle-posts-id-views/post})]]]]
237- [" admin" {:middleware [[mw/apply-auth {:required-type :admin }]]}]]
236+ [" /views" (route {:post analytics-bundle-posts-id-views/post})]]]]
237+ [" admin" {:middleware [[mw/apply-auth {:required-type :admin }]]}
238+ [" /general" ]
239+ [" /top" ]]]
238240
239241 [" /bundle" {:middleware [[mw/apply-bundle]]
240242 :tags #{" bundles" }}
You can’t perform that action at this time.
0 commit comments