Display password prompt in CLI add-user
This commit is contained in:
parent
09a318ae32
commit
12e2d2a3e0
|
@ -32,7 +32,7 @@ main = do
|
||||||
addUserMain :: AddUserOpts -> CLIM ()
|
addUserMain :: AddUserOpts -> CLIM ()
|
||||||
addUserMain AddUserOpts {..} = do
|
addUserMain AddUserOpts {..} = do
|
||||||
time <- currentTime
|
time <- currentTime
|
||||||
passwordHash <- putStr "Password: " >> liftIO (withoutInputEcho getLine) >>= hashPassword
|
passwordHash <- putStr "Password: " >> hFlush stdout >> liftIO (withoutInputEcho getLine) >>= hashPassword
|
||||||
userID <- addUser $ DBUser
|
userID <- addUser $ DBUser
|
||||||
{ dBUserRegistered = time
|
{ dBUserRegistered = time
|
||||||
, dBUserPasswordCrypt = passwordHash
|
, dBUserPasswordCrypt = passwordHash
|
||||||
|
|
Loading…
Reference in New Issue