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