RootR to HomeR #267
This commit is contained in:
parent
cbd0719f37
commit
5b07edd2db
@ -21,7 +21,7 @@ import qualified Database.Persist.Store~importMigration~
|
||||
import Network.HTTP.Conduit (newManager, def)
|
||||
|
||||
-- Import all relevant handler modules here.
|
||||
import Handler.Root
|
||||
import Handler.Home
|
||||
|
||||
-- This line actually creates our YesodSite instance. It is the second half
|
||||
-- of the call to mkYesodData which occurs in Foundation.hs. Please see
|
||||
|
||||
@ -137,9 +137,9 @@ instance YesodAuth ~sitearg~ where
|
||||
type AuthId ~sitearg~ = UserId
|
||||
|
||||
-- Where to send a user after successful login
|
||||
loginDest _ = RootR
|
||||
loginDest _ = HomeR
|
||||
-- Where to send a user after logout
|
||||
logoutDest _ = RootR
|
||||
logoutDest _ = HomeR
|
||||
|
||||
getAuthId creds = runDB $ do
|
||||
x <- getBy $ UniqueUser $ credsIdent creds
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
module Handler.Root where
|
||||
module Handler.Home where
|
||||
|
||||
import Import
|
||||
|
||||
-- This is a handler function for the GET request method on the RootR
|
||||
-- This is a handler function for the GET request method on the HomeR
|
||||
-- resource pattern. All of your resource patterns are defined in
|
||||
-- config/routes
|
||||
--
|
||||
-- The majority of the code you will write in Yesod lives in these handler
|
||||
-- functions. You can spread them across multiple files if you are so
|
||||
-- inclined, or create a single monolithic file.
|
||||
getRootR :: Handler RepHtml
|
||||
getRootR = do
|
||||
getHomeR :: Handler RepHtml
|
||||
getHomeR = do
|
||||
defaultLayout $ do
|
||||
h2id <- lift newIdent
|
||||
setTitle "~project~ homepage"
|
||||
@ -4,4 +4,4 @@
|
||||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
|
||||
@ -32,7 +32,7 @@ library
|
||||
Model
|
||||
Settings
|
||||
Settings.StaticFiles
|
||||
Handler.Root
|
||||
Handler.Home
|
||||
|
||||
ghc-options: -Wall -threaded -O0
|
||||
cpp-options: -DDEVELOPMENT
|
||||
|
||||
@ -20,7 +20,7 @@ import Network.Wai.Middleware.RequestLogger (logCallback)
|
||||
import Network.Wai (Application)
|
||||
|
||||
-- Import all relevant handler modules here.
|
||||
import Handler.Root
|
||||
import Handler.Home
|
||||
|
||||
-- This line actually creates our YesodSite instance. It is the second half
|
||||
-- of the call to mkYesodData which occurs in Foundation.hs. Please see
|
||||
|
||||
@ -3,5 +3,5 @@
|
||||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ library
|
||||
Import
|
||||
Settings
|
||||
Settings.StaticFiles
|
||||
Handler.Root
|
||||
Handler.Home
|
||||
|
||||
ghc-options: -Wall -threaded -O0
|
||||
cpp-options: -DDEVELOPMENT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user