feat(web/panettone): Allow requesting JSON

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>
This commit is contained in:
Griffin Smith 2021-04-18 17:27:45 +02:00 committed by grfn
parent 32793298b7
commit 77c09076ec
2 changed files with 41 additions and 4 deletions

View file

@ -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