Removed warnings about unused symbols
This commit is contained in:
parent
034685e40e
commit
e0092b300a
4 changed files with 7 additions and 7 deletions
|
@ -44,8 +44,8 @@ postNewAvatarR = do
|
||||||
case res of
|
case res of
|
||||||
FormSuccess na -> do
|
FormSuccess na -> do
|
||||||
raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs
|
raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs
|
||||||
(thumb, hash) <- generateThumb $ B.concat $ L.toChunks raw
|
(thumb, hash') <- generateThumb $ B.concat $ L.toChunks raw
|
||||||
runDB $ insert_ $ Avatar (avatarNewIdent na) thumb hash
|
runDB $ insert_ $ Avatar (avatarNewIdent na) thumb hash'
|
||||||
setMessageI MsgAvatarUploadSuccessfull
|
setMessageI MsgAvatarUploadSuccessfull
|
||||||
redirect HomeR
|
redirect HomeR
|
||||||
_ -> do
|
_ -> do
|
||||||
|
@ -113,11 +113,11 @@ updateAvatar aId (AvatarMod ident Nothing) =
|
||||||
runDB $ update aId [AvatarIdent =. ident]
|
runDB $ update aId [AvatarIdent =. ident]
|
||||||
updateAvatar aId (AvatarMod ident (Just fi)) = do
|
updateAvatar aId (AvatarMod ident (Just fi)) = do
|
||||||
raw <- runResourceT $ fileSource fi $$ sinkLbs
|
raw <- runResourceT $ fileSource fi $$ sinkLbs
|
||||||
(thumb, hash) <- generateThumb $ B.concat $ L.toChunks raw
|
(thumb, hash') <- generateThumb $ B.concat $ L.toChunks raw
|
||||||
runDB $ update aId
|
runDB $ update aId
|
||||||
[ AvatarIdent =. ident
|
[ AvatarIdent =. ident
|
||||||
, AvatarData =. thumb
|
, AvatarData =. thumb
|
||||||
, AvatarHash =. hash
|
, AvatarHash =. hash'
|
||||||
]
|
]
|
||||||
|
|
||||||
generateThumb :: ByteString -> Handler (ByteString, ByteString)
|
generateThumb :: ByteString -> Handler (ByteString, ByteString)
|
||||||
|
|
|
@ -23,7 +23,7 @@ getBuyR :: UserId -> BeverageId -> Handler Html
|
||||||
getBuyR uId bId = do
|
getBuyR uId bId = do
|
||||||
mTup <- checkData uId bId
|
mTup <- checkData uId bId
|
||||||
case mTup of
|
case mTup of
|
||||||
Just (user, bev) -> do
|
Just (_, bev) -> do
|
||||||
master <- getYesod
|
master <- getYesod
|
||||||
(buyWidget, enctype) <- generateFormPost
|
(buyWidget, enctype) <- generateFormPost
|
||||||
$ renderBootstrap3 BootstrapBasicForm
|
$ renderBootstrap3 BootstrapBasicForm
|
||||||
|
|
|
@ -47,7 +47,7 @@ getUserReactivateR :: UserId -> Handler Html
|
||||||
getUserReactivateR uId = do
|
getUserReactivateR uId = do
|
||||||
mUser <- runDB $ get uId
|
mUser <- runDB $ get uId
|
||||||
case mUser of
|
case mUser of
|
||||||
Just user -> do
|
Just _ -> do
|
||||||
time <- liftIO getCurrentTime
|
time <- liftIO getCurrentTime
|
||||||
let secs = R.read $ formatTime defaultTimeLocale "%s" time
|
let secs = R.read $ formatTime defaultTimeLocale "%s" time
|
||||||
runDB $ update uId [UserTimestamp =. secs]
|
runDB $ update uId [UserTimestamp =. secs]
|
||||||
|
|
|
@ -102,7 +102,7 @@ getDeleteSupplierR :: SupplierId -> Handler Html
|
||||||
getDeleteSupplierR sId = do
|
getDeleteSupplierR sId = do
|
||||||
mSup <- runDB $ get sId
|
mSup <- runDB $ get sId
|
||||||
case mSup of
|
case mSup of
|
||||||
Just sup -> do
|
Just _ -> do
|
||||||
a <- runDB $ selectList [BeverageSupplier ==. (Just sId)] []
|
a <- runDB $ selectList [BeverageSupplier ==. (Just sId)] []
|
||||||
if null a
|
if null a
|
||||||
then do
|
then do
|
||||||
|
|
Loading…
Reference in a new issue