FIX: Transaction Route names
FIX: Bug where belonging transactions wouldnt select properly
This commit is contained in:
@@ -20,13 +20,13 @@ router.post(
|
|||||||
)
|
)
|
||||||
|
|
||||||
router.get(
|
router.get(
|
||||||
'/admin/belonging/:belongingId/inventory',
|
'/admin/get-stock-by-belonging/:belongingId',
|
||||||
// perm.requires('getallbelongings'),
|
// perm.requires('getallbelongings'),
|
||||||
transactionController.getBelongingInventory
|
transactionController.getBelongingInventory
|
||||||
)
|
)
|
||||||
|
|
||||||
router.get(
|
router.get(
|
||||||
'/admin/belonging/:belongingId',
|
'/admin/get-all-by-belonging/:belongingId',
|
||||||
// perm.requires('getallbelongings'),
|
// perm.requires('getallbelongings'),
|
||||||
transactionController.getTransactionByBelongingId
|
transactionController.getTransactionByBelongingId
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const getBelongingInventory = async (belongingId) => {
|
|||||||
const result = await Transaction.aggregate([
|
const result = await Transaction.aggregate([
|
||||||
{
|
{
|
||||||
$match: {
|
$match: {
|
||||||
belongingId: ObjectID,
|
belongingId: belonging._id,
|
||||||
$or: [{ status: 'finished' }, { status: 'pending' }],
|
$or: [{ status: 'finished' }, { status: 'pending' }],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user