fix:web: check options like --capabilities before starting the app

This commit is contained in:
Simon Michael 2023-10-21 08:54:44 +01:00
parent 9b8044f737
commit b6a0ecd424

View File

@ -117,17 +117,17 @@ webmode =
-- hledger-web options, used in hledger-web and above
data WebOpts = WebOpts
{ serve_ :: Bool
, serve_api_ :: Bool
, cors_ :: Maybe String
, host_ :: String
, port_ :: Int
, base_url_ :: String
, file_url_ :: Maybe String
, capabilities_ :: [Capability]
, capabilitiesHeader_ :: Maybe (CI ByteString)
, cliopts_ :: CliOpts
, socket_ :: Maybe String
{ serve_ :: !Bool
, serve_api_ :: !Bool
, cors_ :: !(Maybe String)
, host_ :: !String
, port_ :: !Int
, base_url_ :: !String
, file_url_ :: !(Maybe String)
, capabilities_ :: ![Capability]
, capabilitiesHeader_ :: !(Maybe (CI ByteString))
, cliopts_ :: !CliOpts
, socket_ :: !(Maybe String)
} deriving (Show)
defwebopts :: WebOpts