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