summaryrefslogtreecommitdiff
path: root/Handler/DeleteItem.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-14 01:06:28 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-14 01:06:28 +0100
commitd84b462a711ce95593ff05a7581e722562c3835a (patch)
tree41e5af455fea925b2680b29718b24ba2876e803a /Handler/DeleteItem.hs
downloadbar-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.hs10
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 @@
1module Handler.DeleteItem where
2
3import Import
4
5postDeleteItemR :: ItemId -> Handler TypedContent
6postDeleteItemR itemId = do
7 runDB $ delete itemId
8 selectRep $ do
9 provideJson ()
10 provideRep (redirect $ InventoryListingR :: Handler Html)