From 23006baa0c98aed679ceb63fee66319aa7e90a9b Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 6 May 2024 13:27:40 +0200 Subject: [PATCH] comment --- src/plugin_middleware.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugin_middleware.rs b/src/plugin_middleware.rs index e464f61b79..0a9e58c46d 100644 --- a/src/plugin_middleware.rs +++ b/src/plugin_middleware.rs @@ -65,6 +65,7 @@ where let path = service_req.path().replace("/api/v3/", "").replace("/", "_"); // TODO: naming can be a bit silly, `POST /api/v3/post` becomes `api_before_post_post` let plugin_hook = format!("api_before_{method}_{path}").to_lowercase(); + info!("Calling plugin hook {}", &plugin_hook); if let Some(mut plugins) = load_plugins()? { if plugins.function_exists(&plugin_hook) { @@ -79,6 +80,9 @@ where } } let res = svc.call(service_req).await?; + + // TODO: add after hook + Ok(res) }) }