change post-upload redirect

Now redirecting users to the album they uploaded to.
This commit is contained in:
nek0 2016-12-04 21:39:48 +01:00
parent c4185a65e7
commit ae2759fde3
2 changed files with 5 additions and 5 deletions

View file

@ -106,7 +106,7 @@ postDirectUploadR albumId = do
L.null onlyErrNames
then do
setMessage "All images succesfully uploaded"
redirect HomeR
redirect $ AlbumR albumId
else do
let justErrNames = map fromJust onlyErrNames
let msg = Content $ Text.Blaze.Internal.Text $ "File type not supported of: " `T.append` T.intercalate ", " justErrNames
@ -322,14 +322,14 @@ postUploadR = do
L.null onlyErrNames
then do
setMessage "All images succesfully uploaded"
redirect HomeR
redirect $ AlbumR $ fileBulkAlbum temp
else do
let justErrNames = map fromJust onlyErrNames
let msg = Content $ Text.Blaze.Internal.Text $ "File type not supported of: " `T.append` T.intercalate ", " justErrNames
setMessage msg
redirect HomeR
redirect $ AlbumR $ fileBulkAlbum temp
_ -> do
setMessage "There was an error uploading the file"
setMessage "There was an error uploading the file(s)"
redirect UploadR
Nothing -> do
setMessage "You need to be logged in"

View file

@ -1,5 +1,5 @@
name: eidolon
version: 0.1.5.4
version: 0.1.5.5
synopsis: Image gallery in Yesod
homepage: https://eidolon.nek0.eu
license: AGPL-3