summaryrefslogtreecommitdiff
path: root/Handler/DeleteItem.hs
blob: ee6d9d3fcbb63e2068769fc37e6988e5959b4378 (plain)
1
2
3
4
5
6
7
8
9
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)