Browse files

Sync with last changes in RESTAS.

  • Loading branch information...
1 parent 130361c commit 0c44f0edd58b5be9ca55e4994beef4472d783749 @archimag committed Jan 7, 2013
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/routes.lisp
@@ -51,25 +51,23 @@
(restas:genurl 'list-notes)
(max (- start *max-on-page*) 1))))))
-(restas:define-route view-note (":id"
- :parse-vars (list :id #'parse-integer))
+(restas:define-route view-note (":id")
+ (:sift-variables (id 'integer))
(note-plist (storage-get-note *storage* id)))
(restas:define-route create-note ("create")
(list :title "Создать"))
-(restas:define-route preview-note ("create"
- :method :post
- :requirement #'(lambda () (hunchentoot:post-parameter "preview")))
+(restas:define-route preview-note ("create" :method :post)
+ (:requirement #'(lambda () (hunchentoot:post-parameter "preview")))
(list :title (hunchentoot:post-parameter "title")
:author (colorize-user)
:code (hunchentoot:post-parameter "code")
:lang (hunchentoot:post-parameter "lang")))
-(restas:define-route save-note ("create"
- :method :post
- :requirement #'(lambda () (hunchentoot:post-parameter "save")))
+(restas:define-route save-note ("create" :method :post)
+ (:requirement #'(lambda () (hunchentoot:post-parameter "save")))
(let ((author (colorize-user)))
(if author
(restas:redirect 'view-note

0 comments on commit 0c44f0e

Please sign in to comment.