Selaa lähdekoodia

[back] add missing category types

Innocenty Enikeew 7 vuotta sitten
vanhempi
commit
8b09275cfa
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5 4
      back/server.lisp

+ 5 - 4
back/server.lisp

@@ -102,7 +102,7 @@
   (with-gensyms (query-string query-params)
     `(let ((,category (getsym ,params :category)))
        (case ,category
-         ((artist year album genre type status)
+         ((artist year album publisher country genre type status)
           (let* ((,query-string (getf myway:*env* :query-string))
                  (,query-params (and ,query-string (quri:url-decode-params ,query-string)))
                  (,filter (aget ,query-params "filter"))
@@ -125,9 +125,10 @@
   (with-output-to-string*
     (with-array
       (loop for (cat . count) in results
-         do (with-object
-              (write-key-value "item" cat)
-              (write-key-value "count" count))))))
+         do (write-item
+             (with-object
+               (write-key-value "item" cat)
+               (write-key-value "count" count)))))))
 
 (defun get-category (params)
   (declare #.*standard-optimize-settings*)