RootR to HomeR #267

This commit is contained in:
Michael Snoyman 2012-03-12 13:42:04 +02:00
parent cbd0719f37
commit 5b07edd2db
8 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -4,4 +4,4 @@
/favicon.ico FaviconR GET
/robots.txt RobotsR GET
/ RootR GET
/ HomeR GET

View File

@ -32,7 +32,7 @@ library
Model
Settings
Settings.StaticFiles
Handler.Root
Handler.Home
ghc-options: -Wall -threaded -O0
cpp-options: -DDEVELOPMENT

View File

@ -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

View File

@ -3,5 +3,5 @@
/favicon.ico FaviconR GET
/robots.txt RobotsR GET
/ RootR GET
/ HomeR GET

View File

@ -30,7 +30,7 @@ library
Import
Settings
Settings.StaticFiles
Handler.Root
Handler.Home
ghc-options: -Wall -threaded -O0
cpp-options: -DDEVELOPMENT