From d8d8340aa257035bd231ded3248d3af81b16d504 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Wed, 10 Apr 2024 12:48:32 +0300 Subject: [PATCH] Add the route and handler to delete a article. --- src/main/blog/handlers.cljs | 14 ++++++++++++++ src/main/blog/server.cljs | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/main/blog/handlers.cljs b/src/main/blog/handlers.cljs index d601435..e8150e4 100644 --- a/src/main/blog/handlers.cljs +++ b/src/main/blog/handlers.cljs @@ -98,6 +98,20 @@ (res/status 500) (res/send (ex-message err)))))))) +(defn htmx-delete-article-row-handler-factory + [client] + (fn [req res] + (let [channel (chan) + id (.-id (.-params req))] + (go + (try + (let [id (