summaryrefslogtreecommitdiff
path: root/jakob/dynamic/capabilities/comments.scm
diff options
context:
space:
mode:
Diffstat (limited to 'jakob/dynamic/capabilities/comments.scm')
-rw-r--r--jakob/dynamic/capabilities/comments.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/jakob/dynamic/capabilities/comments.scm b/jakob/dynamic/capabilities/comments.scm
index 7715174..eca05c8 100644
--- a/jakob/dynamic/capabilities/comments.scm
+++ b/jakob/dynamic/capabilities/comments.scm
@@ -97,15 +97,12 @@ This interface exists for dynamically generating the comment view from Haunt."
'())))
(define (handle-get-all-comments limit)
- (let* ((query "SELECT id, slug, name, subject, email, comment, url, approved, reactions, originating_network, reply_to
+ (let* ((query "SELECT id, slug, name, subject, email, comment, url, approved, reactions
FROM comments WHERE approved IS NOT NULL
ORDER BY approved DESC
LIMIT $1")
- (result (exec-query conn query (list limit)))
- (result (map (lambda (comment)
- (append (drop-right comment 1) '(())))
- result)))
- (map (cut apply make-internal-comment~ <>) result)))
+ (result (exec-query conn query (list limit))))
+ (map (lambda (comment) (apply make-internal-comment~ `(,@comment "clearnet" ()))) result)))
(define (get-comments request body)
"API endpoint handler for querying for the comments on a particular post
@@ -126,6 +123,7 @@ This is a wrapper around `get-comments-by-slug'."
(define (get-all-comments request body)
(define (normalize-record record)
+ (write record)
(json-string->scm (internal-comment->json record)))
(let* ((query-string (uri-query (request-uri request)))
(params (if query-string