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(
|
||||
'/admin/belonging/:belongingId/inventory',
|
||||
'/admin/get-stock-by-belonging/:belongingId',
|
||||
// perm.requires('getallbelongings'),
|
||||
transactionController.getBelongingInventory
|
||||
)
|
||||
|
||||
router.get(
|
||||
'/admin/belonging/:belongingId',
|
||||
'/admin/get-all-by-belonging/:belongingId',
|
||||
// perm.requires('getallbelongings'),
|
||||
transactionController.getTransactionByBelongingId
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@ const getBelongingInventory = async (belongingId) => {
|
||||
const result = await Transaction.aggregate([
|
||||
{
|
||||
$match: {
|
||||
belongingId: ObjectID,
|
||||
belongingId: belonging._id,
|
||||
$or: [{ status: 'finished' }, { status: 'pending' }],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user