fukamachi / ningle

Super micro framework for Common Lisp
http://8arrow.org/ningle/
273 stars 25 forks source link

Documentation issue #10

Closed codescrawl closed 9 years ago

codescrawl commented 9 years ago

Hi,

I was a little stumped whilst trying to figure out params in the examples given and found this - it might be worth amending.

The documentation says this:

(setf (ningle:route app "/hello/:name")

'(lambda (params)

      (format nil "Hello, ~A" (assoc "name" params :test #'string=))))

but I had to change it to this to get it working:

(setf (ningle:route app "/hello/:name")

'(lambda (params)

  (format nil "Hello, ~@A" (cdr (assoc :name params)))))

Note the addition of the cdr function and use of a keyword parameter rather than a string. When I used the original it didn't find anything unless I capitalized the string which felt bad to me.

Feel free to ignore or set me right if I've missed something.

lu4nx commented 9 years ago

Yes, and this error also happening in http://8arrow.org/ningle/ :-(

fukamachi commented 9 years ago

Fixed.