2025-05-17 16:42:51 +09:00
|
|
|
(uiop:define-package #:website/helper
|
|
|
|
(:use #:cl)
|
|
|
|
(:use-reexport #:hsx
|
|
|
|
#:jingle
|
2025-05-17 17:14:58 +09:00
|
|
|
#:jonathan
|
|
|
|
#:access)
|
2025-05-17 16:37:45 +09:00
|
|
|
(:export #:api-p))
|
|
|
|
(in-package #:website/helper)
|
|
|
|
|
|
|
|
(defun starts-with-p (prefix string)
|
|
|
|
(let ((pos (search prefix string :start1 0 :end1 (length prefix) :start2 0)))
|
|
|
|
(and pos (= pos 0))))
|
|
|
|
|
|
|
|
(defun api-p ()
|
|
|
|
(starts-with-p "/api/" (request-uri *request*)))
|