cleanup
This commit is contained in:
parent
96a7a28a42
commit
a9bd79caf9
4 changed files with 11 additions and 15 deletions
|
@ -19,7 +19,6 @@ import Text.Jasmine (minifym)
|
|||
import Text.Hamlet (hamletFile)
|
||||
import Yesod.Core.Types (Logger)
|
||||
-- costom imports
|
||||
import Data.Maybe
|
||||
import Data.Text
|
||||
import Helper
|
||||
|
||||
|
@ -73,7 +72,7 @@ instance Yesod App where
|
|||
uId <- return $ getUserIdFromText a
|
||||
user <- runDB $ getJust uId
|
||||
return $ userName user
|
||||
otherwise -> do
|
||||
Nothing -> do
|
||||
return ("" :: Text)
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,3 @@ getHomeR = do
|
|||
recentMedia <- runDB $ selectList [] [Desc MediumTime]
|
||||
defaultLayout $ do
|
||||
$(widgetFile "home")
|
||||
|
||||
postHomeR :: Handler Html
|
||||
postHomeR = do
|
||||
error "not yet implemented"
|
||||
|
|
|
@ -4,7 +4,6 @@ import Import as I
|
|||
import Data.Time
|
||||
import Data.Text
|
||||
import System.FilePath
|
||||
import Database.Persist.Types
|
||||
|
||||
data TempMedium = TempMedium
|
||||
{ tempMediumTitle :: Text
|
||||
|
@ -84,6 +83,7 @@ tagField = Field
|
|||
{ fieldParse = \rawVals _ -> do
|
||||
case rawVals of
|
||||
[x] -> return $ Right $ Just $ splitOn " " x
|
||||
_ -> return $ Left $ error "unexpected tag list"
|
||||
, fieldView = \idAttr nameAttr _ eResult isReq ->
|
||||
[whamlet|<input id=#{idAttr} type="text" name=#{nameAttr}>|]
|
||||
, fieldEnctype = UrlEncoded
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ HomeR GET POST
|
||||
/ HomeR GET
|
||||
/signup SignupR GET POST
|
||||
/login LoginR GET POST
|
||||
/logout LogoutR GET
|
||||
|
@ -11,3 +11,4 @@
|
|||
/user/#UserId ProfileR GET
|
||||
/upload UploadR GET POST
|
||||
/newalbum NewAlbumR GET POST
|
||||
/user/#UserId/album/#AlbumId AlbumR GET
|
||||
|
|
Loading…
Reference in a new issue