FIX: Transaction Route names

FIX: Bug where belonging transactions wouldnt select properly
This commit is contained in:
2025-04-21 23:52:32 +03:30
parent 6f0b634314
commit 9faaeef9ce
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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
)
+1 -1
View File
@@ -69,7 +69,7 @@ const getBelongingInventory = async (belongingId) => {
const result = await Transaction.aggregate([
{
$match: {
belongingId: ObjectID,
belongingId: belonging._id,
$or: [{ status: 'finished' }, { status: 'pending' }],
},
},