summaryrefslogtreecommitdiff
path: root/lib/Properties.hs
diff options
context:
space:
mode:
authorstuebinm2021-11-16 19:51:58 +0100
committerstuebinm2021-11-16 19:51:58 +0100
commitb1dcbc9edd964b9d0cab6c26db4d502840011ac4 (patch)
treebaab42a8926f65f4d09ef982f3dee987c4ddffbd /lib/Properties.hs
parent6c674fa7c2916149937c54b8241d28f0d7c97976 (diff)
add adjustment: add prefix for openWebsite
Diffstat (limited to '')
-rw-r--r--lib/Properties.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 50fec53..90aa3ad 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -153,7 +153,10 @@ checkLayerProperty p@(Property name _value) = case name of
uselessEmptyLayer
suggestProperty $ Property "openWebsiteTrigger" (StrProp "onaction")
unwrapLink p $ \link -> if "https://" `isPrefixOf` link
- then dependsOn $ Link link
+ then do
+ dependsOn $ Link link
+ prefix <- lintConfig configLinkPrefix
+ setProperty "openWebsite" (prefix <> link)
else unwrapPath link (dependsOn . Local)
"openWebsiteTrigger" -> do
isString p
@@ -173,7 +176,7 @@ checkLayerProperty p@(Property name _value) = case name of
"allowApi" -> isForbidden
"exitUrl" -> do
forbidEmptyLayer
- unwrapLink p $ \link -> if "https://" `isPrefixOf` link
+ unwrapLink p $ \link -> if "/" `isPrefixOf` link
then dependsOn $ MapLink link
else unwrapPath link (dependsOn . LocalMap)
"startLayer" -> do