From 77c09076eccf343e7f14ed389719c0866de3d649 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 18 Apr 2021 17:27:45 +0200 Subject: 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 Reviewed-by: tazjin --- web/panettone/src/packages.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/panettone/src/packages.lisp') 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 -- cgit 1.4.1