From d84b462a711ce95593ff05a7581e722562c3835a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:06:28 +0100 Subject: Implement old bar.hs --- Handler/DeleteItem.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Handler/DeleteItem.hs (limited to 'Handler/DeleteItem.hs') 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 @@ +module Handler.DeleteItem where + +import Import + +postDeleteItemR :: ItemId -> Handler TypedContent +postDeleteItemR itemId = do + runDB $ delete itemId + selectRep $ do + provideJson () + provideRep (redirect $ InventoryListingR :: Handler Html) -- cgit v1.2.3