fixes custom parse

This commit is contained in:
Keagan McClelland
2021-03-05 12:40:27 -07:00
parent adab9e7fca
commit e37db33d62
2 changed files with 6 additions and 1 deletions

View File

@@ -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