diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-14 01:06:28 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-03-14 01:06:28 +0100 |
commit | d84b462a711ce95593ff05a7581e722562c3835a (patch) | |
tree | 41e5af455fea925b2680b29718b24ba2876e803a /Handler/DeleteItem.hs | |
download | bar-d84b462a711ce95593ff05a7581e722562c3835a.tar bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.gz bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.bz2 bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.xz bar-d84b462a711ce95593ff05a7581e722562c3835a.zip |
Implement old bar.hs
Diffstat (limited to 'Handler/DeleteItem.hs')
-rw-r--r-- | Handler/DeleteItem.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Handler/DeleteItem.hs b/Handler/DeleteItem.hs new file mode 100644 index 0000000..ee6d9d3 --- /dev/null +++ b/Handler/DeleteItem.hs | |||
@@ -0,0 +1,10 @@ | |||
1 | module Handler.DeleteItem where | ||
2 | |||
3 | import Import | ||
4 | |||
5 | postDeleteItemR :: ItemId -> Handler TypedContent | ||
6 | postDeleteItemR itemId = do | ||
7 | runDB $ delete itemId | ||
8 | selectRep $ do | ||
9 | provideJson () | ||
10 | provideRep (redirect $ InventoryListingR :: Handler Html) | ||