|
|
|
@ -26,7 +26,7 @@
|
|
|
|
|
[client channel]
|
|
|
|
|
(go
|
|
|
|
|
(try
|
|
|
|
|
(let [res (<p! (. client query "select id, title, content, created from articles"))]
|
|
|
|
|
(let [res (<p! (. client query "select id, title, content, created from articles order by created desc"))]
|
|
|
|
|
(>! channel (.-rows res)))
|
|
|
|
|
(catch js/Error err (js/console.log (ex-cause err)))))
|
|
|
|
|
channel)
|
|
|
|
@ -40,7 +40,8 @@
|
|
|
|
|
(str "select id, title, "
|
|
|
|
|
"substr(content, 0, 60) content, "
|
|
|
|
|
"length(content) content_length, "
|
|
|
|
|
"created from articles")))]
|
|
|
|
|
"created from articles "
|
|
|
|
|
"order by created desc")))]
|
|
|
|
|
(>! channel (.-rows res)))
|
|
|
|
|
(catch js/Error err (js/console.log (ex-cause err)))))
|
|
|
|
|
channel)
|
|
|
|
|