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 -- hledger-web options, used in hledger-web and above
data WebOpts = WebOpts data WebOpts = WebOpts
{ serve_ :: Bool { serve_ :: !Bool
, serve_api_ :: Bool , serve_api_ :: !Bool
, cors_ :: Maybe String , cors_ :: !(Maybe String)
, host_ :: String , host_ :: !String
, port_ :: Int , port_ :: !Int
, base_url_ :: String , base_url_ :: !String
, file_url_ :: Maybe String , file_url_ :: !(Maybe String)
, capabilities_ :: [Capability] , capabilities_ :: ![Capability]
, capabilitiesHeader_ :: Maybe (CI ByteString) , capabilitiesHeader_ :: !(Maybe (CI ByteString))
, cliopts_ :: CliOpts , cliopts_ :: !CliOpts
, socket_ :: Maybe String , socket_ :: !(Maybe String)
} deriving (Show) } deriving (Show)
defwebopts :: WebOpts defwebopts :: WebOpts