From a8423442d64bb579ce981f37908d30f6bf3cf66e Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Fri, 5 Mar 2021 13:28:40 -0500 Subject: [PATCH] don't conflict, require routes.json in --- routes.json => routes.json.example | 78 +++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 22 deletions(-) rename routes.json => routes.json.example (88%) diff --git a/routes.json b/routes.json.example similarity index 88% rename from routes.json rename to routes.json.example index b5c9e47..2290e15 100644 --- a/routes.json +++ b/routes.json.example @@ -26,6 +26,12 @@ "handlers":[ {"function":"proxyHandler", "args": ["http://ca-load:4000/"]} ] + },{ + "method":"use", + "route": "/googleAuth/", + "handlers":[ + {"function":"proxyHandler", "args": ["http://ca-load:4001/"]} + ] }, { @@ -143,7 +149,7 @@ ] },{ "route":"/data/Mark/multi", - "method":"get", + "method":"post", "handlers":[ {"function":"markMulti", "args": []} ] @@ -308,60 +314,88 @@ }, { - "route":"/data/Configuration/find", + "route":"/data/Freeform/find", "method":"get", "handlers":[ - {"function":"mongoFind", "args": ["camic", "configuration"]} + {"function":"mongoFind", "args": ["camic", "freeform"]} ] },{ - "route":"/data/Configuration/post", + "route":"/data/Freeform/post", "method":"post", "handlers":[ - {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, - {"function":"mongoAdd", "args": ["camic", "configuration"]} + {"function":"mongoAdd", "args": ["camic", "freeform"]} ] },{ - "route":"/data/Configuration/delete", + "route":"/data/Freeform/delete", "method":"delete", "handlers":[ {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, - {"function":"mongoDelete", "args": ["camic", "configuration"]} + {"function":"mongoDelete", "args": ["camic", "freeform"]} ] },{ - "route":"/data/Configuration/update", + "route":"/data/Freeform/update", "method":"post", "handlers":[ {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, - {"function":"mongoUpdate", "args": ["camic", "configuration"]} + {"function":"mongoUpdate", "args": ["camic", "freeform"]} ] - },{ - "route":"/data/Collection/find", + }, + + { + "route":"/data/Configuration/find", "method":"get", "handlers":[ - {"function":"mongoFind", "args": ["camic", "collection"]} + {"function":"mongoFind", "args": ["camic", "configuration"]} ] },{ - "route":"/data/Collection/post", + "route":"/data/Configuration/post", "method":"post", "handlers":[ {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, - {"function":"mongoAdd", "args": ["camic", "collection"]} + {"function":"mongoAdd", "args": ["camic", "configuration"]} ] },{ - "route":"/data/Collection/update", - "method":"post", + "route":"/data/Configuration/delete", + "method":"delete", "handlers":[ {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, - {"function":"mongoUpdate", "args": ["camic", "collection"]} + {"function":"mongoDelete", "args": ["camic", "configuration"]} ] },{ - "route":"/data/Collection/delete", - "method":"delete", + "route":"/data/Configuration/update", + "method":"post", "handlers":[ {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, - {"function":"mongoDelete", "args": ["camic", "collection"]} + {"function":"mongoUpdate", "args": ["camic", "configuration"]} ] - }, + },{ + "route":"/data/Collection/find", + "method":"get", + "handlers":[ + {"function":"mongoFind", "args": ["camic", "collection"]} + ] + },{ + "route":"/data/Collection/post", + "method":"post", + "handlers":[ + {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, + {"function":"mongoAdd", "args": ["camic", "collection"]} + ] + },{ + "route":"/data/Collection/update", + "method":"post", + "handlers":[ + {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, + {"function":"mongoUpdate", "args": ["camic", "collection"]} + ] + },{ + "route":"/data/Collection/delete", + "method":"delete", + "handlers":[ + {"function":"permissionHandler", "args": [["Admin", "Editor"]]}, + {"function":"mongoDelete", "args": ["camic", "collection"]} + ] + }, { "route":"/data/User/find",