getTransByIdR :: String -> Handler Value
getTransByIdR uIdent = do
  mUser <- runDB $ selectFirst [ UserIdent ==. (pack uIdent) ] []
  case mUser of
    Just user -> do
      trans <- runDB $ selectList [ TransactionVendor ==. (entityKey user) ] []
      returnJson trans
    Nothing -> return $ object [ "result" .= ("error" :: Text)]
getTransByIdR :: String -> Handler Value
getTransByIdR uIdent = do
  mUser <- runDB $ selectFirst [ UserIdent ==. (pack uIdent) ] []
  case mUser of
    Just user -> do
      trans <- runDB $ selectList [ TransactionVendor ==. (entityKey user) ] []
      returnJson trans
    Nothing -> return $ object [ "result" .= ("error" :: Text)]
getTransByIdR uIdent = do
  mUser <- runDB $ selectFirst [ UserIdent ==. (pack uIdent) ] []
  case mUser of
    Just user -> do
      trans <- runDB $ selectList [ TransactionVendor ==. (entityKey user) ] []
      returnJson trans
    Nothing -> return $ object [ "result" .= ("error" :: Text)]