postWishHandlerR :: Text -> AccessLevel -> WishId -> Handler Html
postWishHandlerR listUrl Admin wishId = do
    (listId, _) <- getWishlist listUrl Admin
    wish <- runDB $ get wishId
    render <- getMessageRender
    ((updateResult, _), _) <- runFormPost $ wishOwnerForm listId wish
    wasUpdated <- updateIfSuccess updateResult wishId
    if wasUpdated
      then return $ ()
      else do
        ((deleteResult, _), _) <- runFormPost $ deleteWishForm wishId
        wasDeleted <- deleteIfSuccess deleteResult wishId
        if wasDeleted
          then return $ ()
          else setMessage $ toHtml $ render MsgRegisterWishErrorChangingWish
    redirect $ (WishListR listUrl Admin)
postWishHandlerR :: Text -> AccessLevel -> WishId -> Handler Html
postWishHandlerR listUrl Admin wishId = do
    (listId, _) <- getWishlist listUrl Admin
    wish <- runDB $ get wishId
    render <- getMessageRender
    ((updateResult, _), _) <- runFormPost $ wishOwnerForm listId wish
    wasUpdated <- updateIfSuccess updateResult wishId
    if wasUpdated
      then return $ ()
      else do
        ((deleteResult, _), _) <- runFormPost $ deleteWishForm wishId
        wasDeleted <- deleteIfSuccess deleteResult wishId
        if wasDeleted
          then return $ ()
          else setMessage $ toHtml $ render MsgRegisterWishErrorChangingWish
    redirect $ (WishListR listUrl Admin)
postWishHandlerR listUrl Admin wishId = do
    (listId, _) <- getWishlist listUrl Admin
    wish <- runDB $ get wishId
    render <- getMessageRender
    ((updateResult, _), _) <- runFormPost $ wishOwnerForm listId wish
    wasUpdated <- updateIfSuccess updateResult wishId
    if wasUpdated
      then return $ ()
      else do
        ((deleteResult, _), _) <- runFormPost $ deleteWishForm wishId
        wasDeleted <- deleteIfSuccess deleteResult wishId
        if wasDeleted
          then return $ ()
          else setMessage $ toHtml $ render MsgRegisterWishErrorChangingWish
    redirect $ (WishListR listUrl Admin)