Skip to content

Commit

Permalink
Update ballista.sc
Browse files Browse the repository at this point in the history
  • Loading branch information
guenchi authored Apr 30, 2018
1 parent 911dc5c commit eb18d97
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions ballista.sc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
next
get-use
post-use
handle403
staticpath
listen-on
server-on
Expand Down Expand Up @@ -146,10 +147,8 @@
((_ p f1) (syntax (push route-get p f1)))
((_ p f1 f2 ...) (syntax
(push route-get p
(lambda (x break)
(call/cc
(lambda (return)
(iterator (f1 x return) f2 ...))))))))))
(lambda (x return)
(iterator (f1 x return) f2 ...))))))))


(define-syntax post
Expand All @@ -158,10 +157,8 @@
((_ p f1) (syntax (push route-post p f1)))
((_ p f1 f2 ...) (syntax
(push route-post p
(lambda (x break)
(call/cc
(lambda (return)
(iterator (f1 x return) f2 ...))))))))))
(lambda (x return)
(iterator (f1 x return) f2 ...))))))))



Expand All @@ -177,6 +174,13 @@
((post-pass header path payload)
(router route-post path)))))



(define handle403
(lambda x
(errorpage 403 "<center><h5>Powered by Ballista</h5></center>")))



(define staticpath
(lambda (x)
Expand Down

0 comments on commit eb18d97

Please sign in to comment.