Skip to content

Commit

Permalink
fix(stock reports): use module.exports for exposure
Browse files Browse the repository at this point in the history
This commit fixes the stock reports links that use one to many
`exports.fn` resulting in broken links.  To avoid changing the API, I've
refactored the code to use `module.exports` and only export the single
function.
  • Loading branch information
jniles committed Sep 9, 2017
1 parent 89dbd44 commit 045b792
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ function stockAdjustmentReceipt(req, res, next) {
.done();
}

exports.stockAdjustmentReceipt = stockAdjustmentReceipt;
module.exports = stockAdjustmentReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ function stockEntryDepotReceipt(req, res, next) {
.done();
}

exports.stockEntryDepotReceipt = stockEntryDepotReceipt;
module.exports = stockEntryDepotReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ function stockEntryIntegrationReceipt(req, res, next) {
.done();
}

exports.stockEntryIntegrationReceipt = stockEntryIntegrationReceipt;
module.exports = stockEntryIntegrationReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ function stockEntryPurchaseReceipt(req, res, next) {
.done();
}

exports.stockEntryPurchaseReceipt = stockEntryPurchaseReceipt;
module.exports = stockEntryPurchaseReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ function stockExitDepotReceipt(req, res, next) {
.done();
}

exports.stockExitDepotReceipt = stockExitDepotReceipt;
module.exports = stockExitDepotReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ function stockExitLossReceipt(req, res, next) {
.done();
}

exports.stockExitLossReceipt = stockExitLossReceipt;
module.exports = stockExitLossReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ function stockExitPatientReceipt(req, res, next) {
.done();
}

exports.stockExitPatientReceipt = stockExitPatientReceipt;
module.exports = stockExitPatientReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ function stockExitServiceReceipt(req, res, next) {
.done();
}

exports.stockExitServiceReceipt = stockExitServiceReceipt;
module.exports = stockExitServiceReceipt;
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ function stockInventoriesReport(req, res, next) {
.done();
}

exports.stockInventoriesReport = stockInventoriesReport;
module.exports = stockInventoriesReport;
2 changes: 1 addition & 1 deletion server/controllers/stock/reports/stock/inventory_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ function stockInventoryReport(req, res, next) {
.done();
}

exports.stockInventoyReport = stockInventoryReport;
module.exports = stockInventoryReport;
2 changes: 1 addition & 1 deletion server/controllers/stock/reports/stock/lots_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ function stockLotsReport(req, res, next) {
.done();
}

exports.stockLotsReport = stockLotsReport;
module.exports = stockLotsReport;
2 changes: 1 addition & 1 deletion server/controllers/stock/reports/stock/movements_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ function stockMovementsReport(req, res, next) {
.done();
}

exports.stockMovementsReport = stockMovementsReport;
module.exports = stockMovementsReport;

0 comments on commit 045b792

Please sign in to comment.