minor cleanup
This commit is contained in:
parent
a803905570
commit
a6be152981
@ -1,5 +1,4 @@
|
|||||||
{-# LANGUAGE NoImplicitPrelude
|
{-# LANGUAGE NoImplicitPrelude
|
||||||
, ExplicitForAll
|
|
||||||
, RecordWildCards
|
, RecordWildCards
|
||||||
, TemplateHaskell
|
, TemplateHaskell
|
||||||
, FlexibleContexts
|
, FlexibleContexts
|
||||||
@ -13,6 +12,7 @@ module Auth.Dummy
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Import.NoFoundation
|
import Import.NoFoundation
|
||||||
|
import Database.Persist.Sql (SqlBackendCanRead)
|
||||||
|
|
||||||
import Utils.Form
|
import Utils.Form
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ data DummyMessage = MsgDummyIdent
|
|||||||
dummyForm :: ( RenderMessage site FormMessage
|
dummyForm :: ( RenderMessage site FormMessage
|
||||||
, RenderMessage site DummyMessage
|
, RenderMessage site DummyMessage
|
||||||
, YesodPersist site
|
, YesodPersist site
|
||||||
, YesodPersistBackend site ~ SqlBackend
|
, SqlBackendCanRead (YesodPersistBackend site)
|
||||||
, Button site SubmitButton
|
, Button site SubmitButton
|
||||||
, Show (ButtonCssClass site)
|
, Show (ButtonCssClass site)
|
||||||
) => AForm (HandlerT site IO) Text
|
) => AForm (HandlerT site IO) Text
|
||||||
@ -33,10 +33,9 @@ dummyForm = areq userField (fslpI MsgDummyIdent "plugin:ident") Nothing
|
|||||||
userField = textField `addDatalist` liftHandlerT (runDB userList)
|
userField = textField `addDatalist` liftHandlerT (runDB userList)
|
||||||
userList = map (\(Entity _ User{..}) -> userPlugin <> ":" <> userIdent) <$> selectList [] [Asc UserPlugin, Asc UserIdent]
|
userList = map (\(Entity _ User{..}) -> userPlugin <> ":" <> userIdent) <$> selectList [] [Asc UserPlugin, Asc UserIdent]
|
||||||
|
|
||||||
dummyLogin :: forall site.
|
dummyLogin :: ( YesodAuth site
|
||||||
( YesodAuth site
|
|
||||||
, YesodPersist site
|
, YesodPersist site
|
||||||
, YesodPersistBackend site ~ SqlBackend
|
, SqlBackendCanRead (YesodPersistBackend site)
|
||||||
, RenderMessage site FormMessage
|
, RenderMessage site FormMessage
|
||||||
, RenderMessage site DummyMessage
|
, RenderMessage site DummyMessage
|
||||||
, Button site SubmitButton
|
, Button site SubmitButton
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user