mirror of
https://github.com/metosin/reitit.git
synced 2025-12-20 01:21:11 +00:00
10 lines
358 B
Clojure
10 lines
358 B
Clojure
(ns example.plain)
|
|
|
|
(def routes
|
|
["/plain"
|
|
["/plus" {:get (fn [{{:strs [x y]} :query-params :as req}]
|
|
{:status 200
|
|
:body {:total (+ (Long/parseLong x) (Long/parseLong y))}})
|
|
:post (fn [{{:keys [x y]} :body-params}]
|
|
{:status 200
|
|
:body {:total (+ x y)}})}]])
|