Remove authenticated API: Migrte importing to an API

> Mostly because its less awkward to operate.
This commit is contained in:
Dhananjay Balan
2023-11-10 11:06:07 +01:00
parent e045575dda
commit 062a76c8ba
4 changed files with 17 additions and 64 deletions

View File

@@ -7,13 +7,10 @@ module Config
) where
import Options.Applicative
import Data.Text (Text)
data AppConfig = AppConfig
{ appPort :: Int
, appDbFile :: FilePath
, appUser :: Text
, appPassHash :: Text
} deriving (Show, Eq)
appConfig :: Parser AppConfig
@@ -30,15 +27,6 @@ appConfig = AppConfig
<> showDefault
<> value "quotes.db"
<> metavar "TARGET")
<*> strOption
( long "user"
<> help "basic auth user (for writes)"
<> showDefault
<> value "root"
<> metavar "USER")
<*> strOption
( long "password"
<> help "password hash for basic auth user, generate with argon2")
parserOpts :: ParserInfo AppConfig
parserOpts = info (appConfig <**> helper)