mirror of
https://github.com/Start9Labs/registry.git
synced 2026-04-01 20:44:15 +00:00
I fixed the yesod shit
This commit is contained in:
@@ -56,9 +56,7 @@ instance Yesod AgentCtx where
|
|||||||
-- Store session data on the client in encrypted cookies,
|
-- Store session data on the client in encrypted cookies,
|
||||||
-- default session idle timeout is 120 minutes
|
-- default session idle timeout is 120 minutes
|
||||||
makeSessionBackend :: AgentCtx -> IO (Maybe SessionBackend)
|
makeSessionBackend :: AgentCtx -> IO (Maybe SessionBackend)
|
||||||
makeSessionBackend _ = Just <$> defaultClientSessionBackend
|
makeSessionBackend _ = pure Nothing
|
||||||
120 -- timeout in minutes
|
|
||||||
"config/client_session_key.aes"
|
|
||||||
|
|
||||||
-- Yesod Middleware allows you to run code before and after each handler function.
|
-- Yesod Middleware allows you to run code before and after each handler function.
|
||||||
-- The defaultYesodMiddleware adds the response header "Vary: Accept, Accept-Language" and performs authorization checks.
|
-- The defaultYesodMiddleware adds the response header "Vary: Accept, Accept-Language" and performs authorization checks.
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ import Yesod.Core
|
|||||||
newtype AppVersion = AppVersion
|
newtype AppVersion = AppVersion
|
||||||
{ unAppVersion :: (Word16, Word16, Word16, Word16) } deriving (Eq, Ord)
|
{ unAppVersion :: (Word16, Word16, Word16, Word16) } deriving (Eq, Ord)
|
||||||
|
|
||||||
instance Hashable AppVersion where
|
|
||||||
hash (AppVersion (a, b, c, d)) = (2 ^ a) * (3 ^ b) * (5 ^ c) * (7 ^ d)
|
|
||||||
hashWithSalt _ = hash
|
|
||||||
|
|
||||||
instance Read AppVersion where
|
instance Read AppVersion where
|
||||||
readsPrec _ s = case traverse (readMaybe . toS) $ splitOn "+" <=< splitOn "." $ (toS s) of
|
readsPrec _ s = case traverse (readMaybe . toS) $ splitOn "+" <=< splitOn "." $ (toS s) of
|
||||||
Just [major, minor, patch, build] -> [(AppVersion (major, minor, patch, build), "")]
|
Just [major, minor, patch, build] -> [(AppVersion (major, minor, patch, build), "")]
|
||||||
|
|||||||
Reference in New Issue
Block a user