Add swagger endpoint

This commit is contained in:
2022-12-02 17:11:42 +01:00
parent 1c0c1457bd
commit e908d9dd8e
6 changed files with 127 additions and 23 deletions
+6 -3
View File
@@ -57,12 +57,15 @@ unsoundBarcodes loc =
activeItems
:: Text -- barcode
-> LocationId
-> Q Postgres GarfieldDb s (OverviewT (QExpr Postgres s))
-> Q Postgres GarfieldDb s (OverviewT (QExpr Postgres s), InventoryItemT (QExpr Postgres s))
activeItems barcode loc = do
(ov, it) <- overviewItemsByLocation loc
guard_ $ it.barcode ==. val_ barcode
guard_ $ it.available ==. val_ True
pure ov
pure (ov, it)
locations
:: Q Postgres GarfieldDb s (LocationT (QExpr Postgres s))
locations = all_ garfieldDb.locations
-- Inserts