From e19da85b729a4a0fc8316a80ccccb71411f183ce Mon Sep 17 00:00:00 2001 From: eltrac Date: Tue, 17 Mar 2026 11:57:03 +0800 Subject: style: wrap private util functions with comment --- src/weepinbell/retriever.clj | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/weepinbell/retriever.clj b/src/weepinbell/retriever.clj index 328f897..7240e2d 100644 --- a/src/weepinbell/retriever.clj +++ b/src/weepinbell/retriever.clj @@ -3,6 +3,15 @@ [weepinbell.utils :refer [valid-http-url? get-domain get-target respond-json]] [clojure.string :refer [includes?]])) +;; utilities +(defn- respond-webmention-json [data] + (if data + (respond-json data) + (respond-json {:status 404 + :message "Webmention does not exist or is pending for verification."} + 404))) +;; end utilities + (defn all "Get all webmentions." [filter-string] @@ -17,12 +26,6 @@ :else identity)] ;; Use identity instead of not-empty for "no filter" (respond-json (filter pred data)))) -(defn- respond-webmention-json [data] - (if data - (respond-json data) - (respond-json {:status 404 - :message "Webmention does not exist or is pending for verification."} - 404))) (defn by-id "Get one specific webmention by ID." -- cgit v1.2.3