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