Some fixes for persistent2
This commit is contained in:
parent
6eb1447dd9
commit
30352f56ec
@ -477,6 +477,10 @@ type YesodAuthPersist master =
|
|||||||
--
|
--
|
||||||
-- Since 1.2.0
|
-- Since 1.2.0
|
||||||
type AuthEntity master = KeyEntity (AuthId master)
|
type AuthEntity master = KeyEntity (AuthId master)
|
||||||
|
#if MIN_VERSION_persistent(2, 0, 0)
|
||||||
|
type family KeyEntity key
|
||||||
|
type instance KeyEntity (Key x) = x
|
||||||
|
#endif
|
||||||
|
|
||||||
-- | Similar to 'maybeAuthId', but redirects to a login page if user is not
|
-- | Similar to 'maybeAuthId', but redirects to a login page if user is not
|
||||||
-- authenticated or responds with error 401 if this is an API client (expecting JSON).
|
-- authenticated or responds with error 401 if this is an API client (expecting JSON).
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies #-}
|
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies #-}
|
||||||
{-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs #-}
|
{-# LANGUAGE EmptyDataDecls, FlexibleContexts, GADTs #-}
|
||||||
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
module Yesod.PersistSpec where
|
module Yesod.PersistSpec where
|
||||||
|
|
||||||
import Test.Hspec
|
import Test.Hspec
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user