summaryrefslogtreecommitdiff
path: root/Handler/LowItem.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Handler/LowItem.hs')
-rw-r--r--Handler/LowItem.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Handler/LowItem.hs b/Handler/LowItem.hs
new file mode 100644
index 0000000..969e62a
--- /dev/null
+++ b/Handler/LowItem.hs
@@ -0,0 +1,11 @@
1module Handler.LowItem where
2
3import Import
4
5postLowItemR :: ItemId -> Handler TypedContent
6postLowItemR itemId = do
7 result <- fmap (Entity itemId) . runDB $ updateGet itemId [ ItemRunningLow =. True
8 ]
9 selectRep $ do
10 provideJson result
11 provideRep (redirect $ InventoryListingR :#: itemId :: Handler Html)