File tree Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Original file line number Diff line number Diff line change 3838 {:feed-id feed-id
3939 :creator-id creator-id
4040 :content-type-id content-type-id
41- :posted-at (util/format-rfc-1123 -date posted-at)
41+ :posted-at (util/format-rss -date posted-at)
4242 :thumbnail (if (and thumbnail
4343 (seq thumbnail)
4444 (not (string/includes? thumbnail " .mp3" )))
Original file line number Diff line number Diff line change 3939 (->> (hsql/where
4040 [:in :feed-id feed-ids]
4141 [:in :category-id category-ids])
42- (hsql/order-by (when latest [:created-at :desc ]))
4342 (services/feed-categories ds)
4443 (mapv :feed-id )))
45- type-filtered (->> (when type [:= :content-type-id type])
46- (hsql/where [:in :id category-filtered-feed-ids])
47- (services/feeds ds))]
44+ query (-> (when type [:= :content-type-id type])
45+ (hsql/where [:in :id category-filtered-feed-ids])
46+ (hsql/order-by (when latest [:created-at :desc ])))
47+ type-filtered (services/feeds ds query)]
4848
4949 (res/response type-filtered)))
Original file line number Diff line number Diff line change 2424 [:ts-and-cs [:maybe :int ]]
2525 [:state [:enum " live" " not live" " pending" ]]]]}}}
2626
27- [{:keys [ds] :as _request}]
28- (-> (services/feeds ds)
27+ [{:keys [ds user ] :as _request}]
28+ (-> (services/feeds ds { :where [ := :user-id ( :id user)]} )
2929 (res/response )))
3030
3131(defn post
Original file line number Diff line number Diff line change 212212 [" " (route {:post bundle-posts/post})]
213213 [" /:id" (route {:get bundle-post/get})]]]
214214
215+ [" /api" {:middleware [[mw/apply-api-key]]
216+ :tags #{" api" }
217+ :swagger {:security [{" apiKey" []}]}
218+ :openapi {:security [{:apiKey []}]}}
219+ [" /bundle" {:middleware [[mw/apply-bundle]]}
220+ [" " (route {:get bundle/get})]
221+ [" /categories"
222+ [" " (route {:get bundle-categories/get})]]
223+ [" /feeds"
224+ [" " (route {:post bundle-feeds/post})]
225+ [" /:id"
226+ [" " (route {:get bundle-feed/get})]
227+ [" /posts"
228+ [" " (route {:get bundle-feed-posts/get})]
229+ [" /:post-id" (route {:get bundle-feed-post/get})]]]]
230+ [" /posts"
231+ [" " (route {:post bundle-posts/post})]
232+ [" /:id" (route {:get bundle-post/get})]]]
233+ [" /categories"
234+ [" " (route {:get categories/get})]
235+ [" /:id" (route {:get category/get})]]]
236+
215237 [" /admin" {:middleware [[mw/apply-auth {:required-type :admin }]]
216238 :tags #{" admin" }
217239 :swagger {:security [{" auth" []}]}
You can’t perform that action at this time.
0 commit comments