Fixes after merge
This commit is contained in:
parent
98ededba28
commit
d79fe24d4d
@ -9,4 +9,4 @@
|
||||
./yesod-test
|
||||
./yesod-bin
|
||||
./yesod
|
||||
https://github.com/yesodweb/persistent persistent1.2
|
||||
https://github.com/yesodweb/persistent
|
||||
|
||||
@ -242,7 +242,7 @@ setCreds doRedirects creds = do
|
||||
-- Since 1.1.7
|
||||
clearCreds :: YesodAuth master
|
||||
=> Bool -- ^ if HTTP redirect to 'logoutDest' should be done
|
||||
-> GHandler sub master ()
|
||||
-> HandlerT master IO ()
|
||||
clearCreds doRedirects = do
|
||||
y <- getYesod
|
||||
deleteSession credsKey
|
||||
@ -282,17 +282,8 @@ getLoginR = setUltDestReferer' >> loginHandler
|
||||
getLogoutR :: AuthHandler master ()
|
||||
getLogoutR = setUltDestReferer' >> redirectToPost LogoutR
|
||||
|
||||
<<<<<<< HEAD
|
||||
postLogoutR :: YesodAuth master => GHandler Auth master ()
|
||||
postLogoutR = clearCreds True
|
||||
=======
|
||||
postLogoutR :: AuthHandler master ()
|
||||
postLogoutR = lift $ do
|
||||
y <- getYesod
|
||||
deleteSession credsKey
|
||||
onLogout
|
||||
redirectUltDest $ logoutDest y
|
||||
>>>>>>> origin/yesod1.2
|
||||
postLogoutR = lift $ clearCreds True
|
||||
|
||||
handlePluginR :: Text -> [Text] -> AuthHandler master ()
|
||||
handlePluginR plugin pieces = do
|
||||
|
||||
@ -76,7 +76,6 @@ import Language.Haskell.TH.Syntax as TH
|
||||
import Crypto.Conduit (hashFile, sinkHash)
|
||||
import Crypto.Hash.MD5 (MD5)
|
||||
import Control.Monad.Trans.State
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
|
||||
import qualified Data.ByteString.Base64
|
||||
import qualified Data.ByteString.Char8 as S8
|
||||
@ -100,7 +99,6 @@ import Data.Functor.Identity (runIdentity)
|
||||
import qualified Filesystem.Path.CurrentOS as F
|
||||
import Filesystem.Path.CurrentOS ((</>), (<.>), FilePath)
|
||||
import Filesystem (createTree)
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Lazy as TL
|
||||
import qualified Data.Text.Lazy.Encoding as TLE
|
||||
import Data.Default
|
||||
@ -341,7 +339,7 @@ mkStaticFilesList fp fs routeConName makeHash = do
|
||||
mkSquashedStringsDecl squashedFinal = do
|
||||
name <- newName "squashedStrings"
|
||||
pack' <- [|pack|]
|
||||
squashedFinal' <- lift squashedFinal
|
||||
squashedFinal' <- TH.lift squashedFinal
|
||||
let decl = [ SigD name (ConT ''Text)
|
||||
, FunD name
|
||||
[ Clause [] (NormalB $ pack' `AppE` squashedFinal') []
|
||||
@ -350,7 +348,7 @@ mkStaticFilesList fp fs routeConName makeHash = do
|
||||
return (name, decl)
|
||||
mkSquashedReference squashedName squashMap = \str ->
|
||||
case M.lookup str squashMap of
|
||||
Nothing -> [|pack $(lift str)|]
|
||||
Nothing -> [|pack $(TH.lift str)|]
|
||||
Just (pos, len) -> [|T.take len (T.drop pos $(return (VarE squashedName)))|]
|
||||
mkRoute refName f = do
|
||||
let name' = intercalate "_" $ map (map replace') f
|
||||
|
||||
Loading…
Reference in New Issue
Block a user