module Handler.LowItem where import Import postLowItemR :: ItemId -> Handler TypedContent postLowItemR itemId = do result <- fmap (Entity itemId) . runDB $ updateGet itemId [ ItemRunningLow =. True ] selectRep $ do provideJson result provideRep (redirect $ InventoryListingR :#: itemId :: Handler Html)