Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; form data defined as an Entry
- (defschema Entry
- { :callsign-used String
- :location String
- :op-type String
- :pwr-type String
- :stn-type String
- :mode-type String
- :digi-qsos Num
- :cw-qsos Num
- :ssb-qsos Num
- :mplier Num
- :cnty-worked Num
- :bonus-worked Num
- :op-name String
- :op-callsign String
- :soap-box String })
- ;; modified the default generated code created by 'lein new luminus <name>'
- (defroutes home-routes
- (GET "/" request (entry-page request))
- (POST "/" request
- :query-params [entry :- Entry]
- :returns Entry
- (process-entry! entry))
- (GET "/about" [] (about-page)))
- ;; The result is that the map that gets passed into 'process-entry! has un-coerced values
- ;;process-entry! params -> {:soap-box "hey",
- ;; :digi-qsos "9",
- ;; :pwr-type "High",
- ;; :mplier "7",
- ;; :cnty-worked "8",
- ;; :stn-type "Single Transmitter",
- ;; :mode-type "CW Only",
- ;; :ssb-qsos "8",
- ;; :cw-qsos "7",
- ;; :callsign-used "ar8a",
- ;; :bonus-worked "67",
- ;; :op-name "bob ",
- ;; :location "Here",
- ;; :__anti-forgery-token "XG38nz/y7k8foobar",
- ;; :op-type "Single Operator",
- ;; :op-callsign "r8ra"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement