Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sync with last changes in RESTAS.

  • Loading branch information...
commit 0c44f0edd58b5be9ca55e4994beef4472d783749 1 parent 130361c
@archimag authored
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/routes.lisp
View
14 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
Please sign in to comment.
Something went wrong with that request. Please try again.