diff --git a/Handler/AlbumSettings.hs b/Handler/AlbumSettings.hs index faadfd3..9873988 100755 --- a/Handler/AlbumSettings.hs +++ b/Handler/AlbumSettings.hs @@ -19,7 +19,6 @@ module Handler.AlbumSettings where import Import import Handler.Commons import qualified Data.Text as T -import Data.Maybe import System.Directory import System.FilePath import qualified Data.List as L diff --git a/Handler/Commons.hs b/Handler/Commons.hs index a271079..9341129 100755 --- a/Handler/Commons.hs +++ b/Handler/Commons.hs @@ -24,7 +24,6 @@ import Network.HTTP.Client import Network.HTTP.Types.Status as S import qualified Data.ByteString.Char8 as C import qualified Data.ByteString.Lazy as BL -import qualified Data.Text as T loginIsAdmin :: IsString t => Handler (Either (t, Route App) ()) @@ -97,7 +96,7 @@ putIndexES input = do ESUser uId user -> do ex <- runBH' $ indexExists (IndexName "user") unless ex ((\ _ -> do - runBH' $ createIndex is (IndexName "user") + _ <- runBH' $ createIndex is (IndexName "user") return () ) ex) _ <- runBH' $ openIndex (IndexName "user") @@ -107,7 +106,7 @@ putIndexES input = do ESAlbum aId album -> do ex <- runBH' $ indexExists (IndexName "album") unless ex ((\ _ -> do - runBH' $ createIndex is (IndexName "album") + _ <- runBH' $ createIndex is (IndexName "album") return () ) ex) _ <- runBH' $ openIndex (IndexName "album") @@ -117,7 +116,7 @@ putIndexES input = do ESMedium mId medium -> do ex <- runBH' $ indexExists (IndexName "medium") unless ex ((\ _ -> do - runBH' $ createIndex is (IndexName "medium") + _ <- runBH' $ createIndex is (IndexName "medium") return () ) ex) _ <- runBH' $ openIndex (IndexName "medium") @@ -127,7 +126,7 @@ putIndexES input = do ESComment cId comment -> do ex <- runBH' $ indexExists (IndexName "comment") unless ex ((\ _ -> do - runBH' $ createIndex is (IndexName "comment") + _ <- runBH' $ createIndex is (IndexName "comment") return () ) ex) _ <- runBH' $ openIndex (IndexName "comment") @@ -173,7 +172,7 @@ checkResponseES resp = 200 -> return () code -> error $ (show code) ++ ": " ++ (C.unpack $ BL.toStrict $ responseBody resp) --- runBH' :: BH m a -> Handler resp +runBH' :: BH m a -> m b runBH' action = do master <- getYesod let s = appSearchHost $ appSettings master diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index d563c60..fb12771 100755 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -5,7 +5,7 @@
  • Home - $maybe su <- msu + $maybe _ <- msu
  • @@ -24,7 +24,7 @@
  • Logout - $maybe admin <- madmin + $maybe _ <- madmin
  • Administration