web: dodge a yesod-core regression breaking add form redirect (#53)
This commit is contained in:
		
							parent
							
								
									1b834afb20
								
							
						
					
					
						commit
						0bd7fffaf7
					
				| @ -509,15 +509,14 @@ handleAdd = do | ||||
|                  $forall e<-errs | ||||
|                   #{e}<br> | ||||
|                |] | ||||
|     getRegisterR | ||||
| 
 | ||||
|    Right t -> do | ||||
|     let t' = txnTieKnot t -- XXX move into balanceTransaction | ||||
|     liftIO $ do ensureJournalFile journalpath | ||||
|                 appendToJournalFileOrStdout journalpath $ showTransaction t' | ||||
|     -- setMessage $ toHtml $ (printf "Added transaction:\n%s" (show t') :: String) | ||||
|     setMessage [$shamlet|<span>Added transaction:<small><pre>#{chomp $ show t'}</pre></small>|] | ||||
|     getRegisterR | ||||
| 
 | ||||
|   redirectParams RedirectTemporary RegisterR [("add","1")] | ||||
| 
 | ||||
| chomp :: String -> String | ||||
| chomp = reverse . dropWhile (`elem` "\r\n") . reverse | ||||
|  | ||||
| @ -92,7 +92,7 @@ executable hledger-web | ||||
|                  ,template-haskell >= 2.4 && < 2.7 | ||||
| 
 | ||||
|                  ,yesod >= 0.9.2.1 && < 0.10 | ||||
|                  ,yesod-core | ||||
|                  ,yesod-core >= 0.9.4.1 && < 0.10 | ||||
|                  ,yesod-form | ||||
|                  ,yesod-json | ||||
|                  ,yesod-static >= 0.3 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user