Change prefix from 'on' to 'handle'

This commit is contained in:
paku 2024-04-14 16:39:43 +09:00
parent 438030b0b8
commit e84b170a03
2 changed files with 9 additions and 9 deletions

View file

@ -48,22 +48,22 @@ To use ningle-fbr, you must use [package-inferred-system](https://asdf.common-li
```lisp
(uiop:define-package #:example/routes/index
(:use #:cl)
(:export #:on-get
#:on-post
#:on-put
#:on-delete))
(:export #:handle-get
#:handle-post
#:handle-put
#:handle-delete))
(in-package #:example/routes/index)
(defun on-get (params)
(defun handle-get (params)
...)
(defun on-post (params)
(defun handle-post (params)
...)
(defun on-put (params)
(defun handle-put (params)
...)
(defun on-delete (params)
(defun handle-delete (params)
...)
```

View file

@ -58,7 +58,7 @@
:do (ql:quickload pkg)
(loop
:for method :in *http-request-methods*
:do (let ((handler (find-symbol (concatenate 'string "ON-" (string method))
:do (let ((handler (find-symbol (concatenate 'string "HANDLE-" (string method))
pkg)))
(when handler
(setf (ng:route app url :method method) handler))))))