File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed
Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ Stuff on top of [Compojure](https://github.com/weavejester/compojure) for making
2323; ; Schemas
2424; ;
2525
26- (s/defschema Total {:total Long})
27-
2826(s/defschema Thingie {:id Long
2927 :hot Boolean
3028 :tag (s/enum :kikka :kukka )
@@ -48,40 +46,34 @@ Stuff on top of [Compojure](https://github.com/weavejester/compojure) for making
4846 (context " /api" []
4947
5048 (GET* " /plus" []
51- :return Total
49+ :return Long
5250 :query-params [x :- Long {y :- Long 1 }]
5351 :summary " x+y with query-parameters. y defaults to 1."
54- (ok { :total (+ x y)} ))
52+ (ok (+ x y)))
5553
5654 (POST* " /minus" []
57- :return Total
55+ :return Long
5856 :body-params [x :- Long y :- Long]
5957 :summary " x-y with body-parameters."
60- (ok { :total (- x y)} ))
58+ (ok (- x y)))
6159
6260 (GET* " /times/:x/:y" []
63- :return Total
61+ :return Long
6462 :path-params [x :- Long y :- Long]
6563 :summary " x*y with path-parameters"
66- (ok {:total (* x y)}))
67-
68- (POST* " /divide" []
69- :return Total
70- :form-params [x :- Long y :- Long]
71- :summary " x/y with form-parameters"
72- (ok {:total (quot x y)}))
64+ (ok (* x y)))
7365
7466 (POST* " /divide" []
75- :return { :total Double}
67+ :return Double
7668 :form-params [x :- Long y :- Long]
7769 :summary " x/y with form-parameters"
78- (ok { :total (/ x y)} ))
70+ (ok (/ x y)))
7971
8072 (GET* " /power" []
81- :return Total
73+ :return Long
8274 :header-params [x :- Long y :- Long]
8375 :summary " x^y with header-parameters"
84- (ok { :total (long (Math/pow x y))} ))
76+ (ok (long (Math/pow x y))))
8577
8678 legacy-route
8779
You can’t perform that action at this time.
0 commit comments