From 65dd1d1ca2b7fe7bfb96b90ca72102efcb3ad9b1 Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 8 Nov 2022 13:06:26 +0100 Subject: [PATCH] [WIP] Check for allowed resources --- src/main/cljs/dda/c4k_common/yaml.cljs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/cljs/dda/c4k_common/yaml.cljs b/src/main/cljs/dda/c4k_common/yaml.cljs index 11a39e8..057ec62 100644 --- a/src/main/cljs/dda/c4k_common/yaml.cljs +++ b/src/main/cljs/dda/c4k_common/yaml.cljs @@ -28,7 +28,10 @@ (defmulti load-as-edn dispatch-by-resource-name) -(defmethod load-as-edn :cljs [resource-name] - (yaml/from-string (yaml/load-resource resource-name))) +(defmethod load-as-edn :cljs [allowed-resource resource-name] + (from-string (load-resource (allowed-resource) resource-name))) -(defmulti allowed-resources dispatch-by-resource-name) \ No newline at end of file +(defmulti allowed-resources dispatch-by-resource-name) + +(defmethod allowed-resources :cljs [] + []) \ No newline at end of file