mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
fixes custom parse
This commit is contained in:
2
agent/src/Lib/External/AppManifest.hs
vendored
2
agent/src/Lib/External/AppManifest.hs
vendored
@@ -137,7 +137,7 @@ instance FromJSON LanConfiguration where
|
||||
standard =
|
||||
withText "Standard Lan" \t -> if t == "standard" then pure Standard else fail "Not Standard Lan Conf"
|
||||
custom = withObject "Custom Lan" $ \o -> do
|
||||
Custom <$> o .: "port"
|
||||
Custom <$> (o .: "custom" >>= (.: "port"))
|
||||
data PortMapEntry = PortMapEntry
|
||||
{ portMapEntryInternal :: Word16
|
||||
, portMapEntryTor :: Word16
|
||||
|
||||
5
agent/test/Lib/External/AppManifestSpec.hs
vendored
5
agent/test/Lib/External/AppManifestSpec.hs
vendored
@@ -87,6 +87,11 @@ ports:
|
||||
- internal: 80
|
||||
tor: 80
|
||||
lan: standard
|
||||
- internal: 443
|
||||
tor: 443
|
||||
lan:
|
||||
custom:
|
||||
port: 443
|
||||
- internal: 3000
|
||||
tor: 3000
|
||||
lan: ~
|
||||
|
||||
Reference in New Issue
Block a user