From e84b170a03c6cee3a4b2b191469e83251ae9e032 Mon Sep 17 00:00:00 2001 From: paku Date: Sun, 14 Apr 2024 16:39:43 +0900 Subject: [PATCH] Change prefix from 'on' to 'handle' --- README.md | 16 ++++++++-------- src/main.lisp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 09f5183..894a571 100644 --- a/README.md +++ b/README.md @@ -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) ...) ``` diff --git a/src/main.lisp b/src/main.lisp index 13f79c9..f758f1f 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -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))))))