diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-11-20 22:15:57 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-11-20 22:15:57 +0100 |
commit | 11a68e62e6d0f858ef7d76f8b7f8809f9ea92a89 (patch) | |
tree | 918da1c9354a6b9ae68f65ed8dcafc3575023008 /logikorr.lisp | |
parent | 7e9769d2dc173397b7c90341e4c452301f1c6590 (diff) |
Implement automatic construction of score input rows.
Diffstat (limited to 'logikorr.lisp')
-rw-r--r-- | logikorr.lisp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/logikorr.lisp b/logikorr.lisp index fefa795..6431144 100644 --- a/logikorr.lisp +++ b/logikorr.lisp @@ -157,16 +157,16 @@ div.autocomplete ul li { (defun find-student-by-id (id) (find id (find-students) :key #'student-id)) -(define-easy-handler (find-student :uri "/find-student") - (name) +(define-easy-handler (find-student :uri "/find-student") (name) (let ((student (find-student-by-name name))) (setf (header-out :content-type) "text/json; charset=UTF-8") (with-slots (id first-name last-name score) student - (json:encode-json-plist - (list :id id - :first-name first-name - :last-name last-name - :score score))))) + (with-output-to-string (*standard-output*) + (json:encode-json-plist + (list :id id + :first-name first-name + :last-name last-name + :score score)))))) (define-easy-handler (update-student-score :uri "/update-student-score") (id score-number score) |