Fix tests
This commit is contained in:
parent
03fa874e05
commit
77d03348e8
@ -678,10 +678,10 @@ instance Yesod UniWorX where
|
||||
encrypted plaintextJson plaintext = do
|
||||
canDecrypt <- (== Authorized) <$> evalAccess AdminErrMsgR True
|
||||
shouldEncrypt <- getsYesod $ appEncryptErrors . appSettings
|
||||
errKey <- getsYesod appErrorMsgKey
|
||||
if
|
||||
| shouldEncrypt
|
||||
, not canDecrypt -> do
|
||||
errKey <- getsYesod appErrorMsgKey
|
||||
nonce <- liftIO SecretBox.newNonce
|
||||
let ciphertext = SecretBox.secretbox errKey nonce . Lazy.ByteString.toStrict $ encode plaintextJson
|
||||
encoded = decodeUtf8 . Base64.encode $ Saltine.encode nonce <> ciphertext
|
||||
|
||||
@ -21,7 +21,7 @@ sampleCron :: Natural -> Cron -> [UTCTime]
|
||||
sampleCron n = go n baseTime Nothing
|
||||
where
|
||||
go 0 _ _ _ = []
|
||||
go (pred -> n') t mPrev cron = case nextCronMatch utcTZ mPrev t cron of
|
||||
go (pred -> n') t mPrev cron = case nextCronMatch utcTZ mPrev 0 t cron of
|
||||
MatchAsap -> t : go n' t (Just t) cron
|
||||
MatchAt t' -> t' : go n' t' (Just t') cron
|
||||
MatchNone -> []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user