Skip to content

Commit 82dd797

Browse files
committed
deploy feature branch
1 parent 223b7bd commit 82dd797

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/routes/copilotRequest/approveRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = [
3535
updatedBy: req.authUser.userId,
3636
});
3737

38-
return approveRequest(data)
38+
return approveRequest(req, data)
3939
.then(_newCopilotOpportunity => res.status(201).json(_newCopilotOpportunity))
4040
.catch((err) => {
4141
if (err.message) {

src/routes/copilotRequest/approveRequest.service.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const resolveTransaction = (transaction, callback) => {
1212
return models.sequelize.transaction(callback);
1313
};
1414

15-
module.exports = (data, existingTransaction) => {
15+
module.exports = (req, data, existingTransaction) => {
1616
const { projectId, copilotRequestId } = data;
1717

1818
return resolveTransaction(existingTransaction, transaction =>
@@ -55,8 +55,8 @@ module.exports = (data, existingTransaction) => {
5555
}))
5656
.then(async (opportunity) => {
5757
console.log(opportunity);
58-
const roles = await util.getRolesByRoleName('copilot');
59-
const roleInfo = await util.getRoleInfo(roles[0]);
58+
const roles = await util.getRolesByRoleName('copilot', req.log, req.id);
59+
const roleInfo = await util.getRoleInfo(roles[0], req.log, req.id);
6060
console.log(roles, roleInfo, 'roles by copilot');
6161

6262
return opportunity;

src/routes/copilotRequest/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module.exports = [
9898
updatedBy: req.authUser.userId,
9999
type: copilotRequest.data.projectType,
100100
});
101-
return approveRequest(approveData, transaction).then(() => copilotRequest);
101+
return approveRequest(req, approveData, transaction).then(() => copilotRequest);
102102
}).then(copilotRequest => res.status(201).json(copilotRequest))
103103
.catch((err) => {
104104
try {

0 commit comments

Comments
 (0)