about summary refs log tree commit diff
path: root/web/panettone/src/packages.lisp
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-04-18T15·27+0200
committergrfn <grfn@gws.fyi>2021-04-22T15·35+0000
commit77c09076eccf343e7f14ed389719c0866de3d649 (patch)
treed0a4357580eac59f220bc2e78d1c5b9e5bcdd7f6 /web/panettone/src/packages.lisp
parent32793298b76c6e6c3858e98b2d4ef9aed8f30eb3 (diff)
feat(web/panettone): Allow requesting JSON r/2534
Allow specifying an `Accept: application/json` header to the index and
show issue routes, to request that those pages be returned as JSON.

Change-Id: Ic225139fc9e7fdce0da98984df4ca987685dafe0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3043
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'web/panettone/src/packages.lisp')
-rw-r--r--web/panettone/src/packages.lisp4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/panettone/src/packages.lisp b/web/panettone/src/packages.lisp
index 3e6aa4a05f4f..a428c188c050 100644
--- a/web/panettone/src/packages.lisp
+++ b/web/panettone/src/packages.lisp
@@ -69,9 +69,11 @@
         :panettone.authentication
         :panettone.inline-markdown)
   (:import-from :defclass-std :defclass/std)
-  (:import-from :alexandria :if-let :when-let :switch :alist-hash-table)
+  (:import-from :alexandria :if-let :when-let :switch :alist-hash-table
+                :assoc-value :eswitch)
   (:import-from :cl-ppcre :split)
   (:import-from :bordeaux-threads :make-thread)
+  (:import-from :cl-json :encode-json :encode-json-to-string)
   (:import-from
    :panettone.model
    :id :subject :body :author-dn :issue-id :status :created-at