From 667b5fb6eecba9167b590691140cdfe653188045 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Mon, 20 Jan 2025 12:30:20 +0100 Subject: [PATCH 1/2] :bug: Fix missing methods reference from api docs page --- CHANGES.md | 2 ++ backend/src/app/rpc/doc.clj | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e8020a4ed..b3fc1a750 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,8 @@ - Fix detach when top copy is dangling and nested copy is not [Taiga #9699](https://tree.taiga.io/project/penpot/issue/9699) - Fix problem in plugins with `replaceColor` method [#174](https://github.com/penpot/penpot-plugins/issues/174) +- Fix missing methods reference on API Docs + ## 2.4.1 diff --git a/backend/src/app/rpc/doc.clj b/backend/src/app/rpc/doc.clj index 217e86332..efd23ed44 100644 --- a/backend/src/app/rpc/doc.clj +++ b/backend/src/app/rpc/doc.clj @@ -87,6 +87,7 @@ (let [params (:query-params request) pstyle (:type params "js") context (assoc context :param-style pstyle)] + {::yres/status 200 ::yres/body (-> (io/resource "app/templates/api-doc.tmpl") (tmpl/render context))})) @@ -207,7 +208,7 @@ (assert (sm/valid? ::rpc/methods (::rpc/methods params)) "expected valid methods")) (defmethod ig/init-key ::routes - [_ {:keys [methods] :as cfg}] + [_ {:keys [::rpc/methods] :as cfg}] [(let [context (prepare-doc-context methods)] [["/_doc" {:handler (doc-handler context) From 089a66881c5816c37a42d405e781a6a327531943 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Mon, 20 Jan 2025 12:30:30 +0100 Subject: [PATCH 2/2] :sparkles: Make frontend app setup logging message more easy to be read Mainly printing flag per line, making it more easily for human eye look if some feature is active or not --- frontend/src/app/main.cljs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main.cljs b/frontend/src/app/main.cljs index e9824671f..57929dfe5 100644 --- a/frontend/src/app/main.cljs +++ b/frontend/src/app/main.cljs @@ -30,20 +30,21 @@ [app.util.i18n :as i18n] [app.util.theme :as theme] [beicon.v2.core :as rx] - [cuerdas.core :as str] [debug] [features] [potok.v2.core :as ptk] [rumext.v2 :as mf])) (log/setup! {:app :info}) +(log/set-level! :debug) (when (= :browser cf/target) - (log/info :version (:full cf/version) - :asserts *assert* - :build-date cf/build-date - :public-uri (dm/str cf/public-uri)) - (log/info :flags (str/join "," (map name cf/flags)))) + (log/inf :version (:full cf/version) + :asserts *assert* + :build-date cf/build-date + :public-uri (dm/str cf/public-uri)) + (doseq [flag cf/flags] + (log/dbg :hint "flag enabled" :flag (name flag)))) (declare reinit)