Skip to content

Commit f211301

Browse files
committed
Lint execution 💪
1 parent 2a79334 commit f211301

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+836
-767
lines changed

apps/server-render/app/data/allocations-dao.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const UserDAO = require("./user-dao").UserDAO;
22

33
/* The AllocationsDAO must be constructed with a connected database object */
4-
const AllocationsDAO = function(db){
4+
const AllocationsDAO = function(db) {
55

66
"use strict";
77

@@ -90,7 +90,7 @@ const AllocationsDAO = function(db){
9090
let doneCounter = 0;
9191
const userAllocations = [];
9292

93-
allocations.forEach( alloc => {
93+
allocations.forEach(alloc => {
9494
userDAO.getUserById(alloc.userId, (err, user) => {
9595
if (err) return callback(err, null);
9696

apps/server-render/app/data/benefits-dao.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ function BenefitsDAO(db) {
4040
};
4141
}
4242

43-
module.exports = { BenefitsDAO };
43+
module.exports = {
44+
BenefitsDAO
45+
};

apps/server-render/app/data/contributions-dao.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function ContributionsDAO(db) {
2626
};
2727

2828
contributionsDB.update({
29-
userId
29+
userId
3030
},
3131
contributions, {
3232
upsert: true
@@ -83,4 +83,6 @@ function ContributionsDAO(db) {
8383
};
8484
}
8585

86-
module.exports = { ContributionsDAO };
86+
module.exports = {
87+
ContributionsDAO
88+
};

apps/server-render/app/data/memos-dao.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ function MemosDAO(db) {
3636

3737
}
3838

39-
module.exports = { MemosDAO };
39+
module.exports = {
40+
MemosDAO
41+
};

apps/server-render/app/data/profile-dao.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,6 @@ function ProfileDAO(db) {
110110
};
111111
}
112112

113-
module.exports = { ProfileDAO };
113+
module.exports = {
114+
ProfileDAO
115+
};

apps/server-render/app/data/research-dao.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ function ResearchDAO(db) {
2424
}
2525
}
2626

27-
module.exports = { ResearchDAO };
27+
module.exports = {
28+
ResearchDAO
29+
};

apps/server-render/app/data/user-dao.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ function UserDAO(db) {
116116
}, {
117117
new: true
118118
},
119-
(err, data) => err ? callback(err, null) : callback(null, data.value.seq));
119+
(err, data) => err ? callback(err, null) : callback(null, data.value.seq));
120120
};
121121
}
122122

123-
module.exports = { UserDAO };
123+
module.exports = {
124+
UserDAO
125+
};

apps/server-render/app/routes/allocations.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const AllocationsDAO = require("../data/allocations-dao").AllocationsDAO;
22

3-
function AllocationsHandler (db) {
3+
function AllocationsHandler(db) {
44
"use strict";
55

66
const allocationsDAO = new AllocationsDAO(db);
@@ -10,12 +10,19 @@ function AllocationsHandler (db) {
1010
// Fix for A4 Insecure DOR - take user id from session instead of from URL param
1111
const { userId } = req.session;
1212
*/
13-
const {userId} = req.params;
14-
const { threshold } = req.query
13+
const {
14+
userId
15+
} = req.params;
16+
const {
17+
threshold
18+
} = req.query
1519

1620
allocationsDAO.getByUserIdAndThreshold(userId, threshold, (err, allocations) => {
1721
if (err) return next(err);
18-
return res.render("allocations", { userId, allocations });
22+
return res.render("allocations", {
23+
userId,
24+
allocations
25+
});
1926
});
2027
};
2128
}

apps/server-render/app/routes/benefits.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
const { BenefitsDAO } = require("../data/benefits-dao");
1+
const {
2+
BenefitsDAO
3+
} = require("../data/benefits-dao");
24

3-
function BenefitsHandler (db) {
5+
function BenefitsHandler(db) {
46
"use strict";
57

68
const benefitsDAO = new BenefitsDAO(db);
@@ -21,7 +23,10 @@ function BenefitsHandler (db) {
2123
};
2224

2325
this.updateBenefits = (req, res, next) => {
24-
const { userId, benefitStartDate } = req.body;
26+
const {
27+
userId,
28+
benefitStartDate
29+
} = req.body;
2530

2631
benefitsDAO.updateBenefits(userId, benefitStartDate, (error) => {
2732

apps/server-render/app/routes/contributions.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
const ContributionsDAO = require("../data/contributions-dao").ContributionsDAO;
22

33
/* The ContributionsHandler must be constructed with a connected db */
4-
function ContributionsHandler (db) {
4+
function ContributionsHandler(db) {
55
"use strict";
66

77
const contributionsDAO = new ContributionsDAO(db);
88

99
this.displayContributions = (req, res, next) => {
10-
const { userId } = req.session;
10+
const {
11+
userId
12+
} = req.session;
1113

1214
contributionsDAO.getByUserId(userId, (error, contrib) => {
1315
if (error) return next(error);
@@ -31,7 +33,9 @@ function ContributionsHandler (db) {
3133
const afterTax = parseInt(req.body.afterTax);
3234
const roth = parseInt(req.body.roth);
3335
*/
34-
const { userId } = req.session;
36+
const {
37+
userId
38+
} = req.session;
3539

3640
//validate contributions
3741
const validations = [isNaN(preTax), isNaN(afterTax), isNaN(roth), preTax < 0, afterTax < 0, roth < 0]

0 commit comments

Comments
 (0)