Update api
This commit is contained in:
parent
4ce40ee01d
commit
8cba94e081
4 changed files with 17 additions and 21 deletions
|
@ -43,8 +43,9 @@
|
|||
(let* ((game-id (create-game gm)))
|
||||
(let ((game-dump (dump gm game-id)))
|
||||
(setf (getf game-dump :game-over) :null) ; Define nil as null (for json)
|
||||
(to-json
|
||||
(append (list :type "state") game-dump))))))
|
||||
(string-downcase
|
||||
(to-json
|
||||
(append (list :type "state") game-dump)))))))
|
||||
|
||||
(defmethod handle-update ((api api) data)
|
||||
(with-slots (gm) api
|
||||
|
@ -54,8 +55,9 @@
|
|||
(if dir
|
||||
(refresh game :dir dir)
|
||||
(refresh game))
|
||||
(to-json
|
||||
(append (list :type "state") (dump gm game-id))))))
|
||||
(string-downcase
|
||||
(to-json
|
||||
(append (list :type "state") (dump gm game-id)))))))
|
||||
|
||||
|
||||
(defmethod handle-request ((api api) request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue