mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-05-28 23:41:31 +00:00
added code to handler to return names of available programs, for display in browser
This commit is contained in:
parent
ca5b98f241
commit
19260d6b67
|
@ -49,6 +49,8 @@
|
|||
:games {}}))
|
||||
|
||||
(defroutes app-routes
|
||||
(GET "/program-names" [] (response/response
|
||||
{:names (map name (keys source-programs/programs))}))
|
||||
(GET "/init" [programs] (let [next-id (:next-id @games-store)]
|
||||
(swap! games-store add-game programs)
|
||||
(response/response {:id next-id})))
|
||||
|
|
Loading…
Reference in New Issue
Block a user