my-typescript-library-rahul52us 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -107,52 +107,54 @@ export async function generateWorkflow(req: any) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
if (approval.isText === 1 && !approval.isActive) {
|
|
110
|
-
let tokenVerifyEmail = sign({
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
const template = await compileEmailTemplate({
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
await Promise.all([
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
]);
|
|
135
|
-
dt = {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
};
|
|
110
|
+
// let tokenVerifyEmail = sign({
|
|
111
|
+
// email: approval.username,
|
|
112
|
+
// name: approval.username,
|
|
113
|
+
// });
|
|
114
|
+
|
|
115
|
+
// const template = await compileEmailTemplate({
|
|
116
|
+
// fileName: "verifyEmail.mjml",
|
|
117
|
+
// data: {
|
|
118
|
+
// name: approval.username,
|
|
119
|
+
// url: `${process.env.FRONTEND_URL}/verify-email?token=${tokenVerifyEmail}`,
|
|
120
|
+
// },
|
|
121
|
+
// });
|
|
122
|
+
|
|
123
|
+
// await Promise.all([
|
|
124
|
+
// sendMail(
|
|
125
|
+
// approval.username,
|
|
126
|
+
// "Confirm your email address",
|
|
127
|
+
// template
|
|
128
|
+
// ),
|
|
129
|
+
// createToken(
|
|
130
|
+
// response.data,
|
|
131
|
+
// tokenVerifyEmail,
|
|
132
|
+
// SEND_MAIL_TYPE.VERIFY_EMAIL
|
|
133
|
+
// ),
|
|
134
|
+
// ]);
|
|
135
|
+
// dt = {
|
|
136
|
+
// ...dt,
|
|
137
|
+
// verifyTokenUrl: `${process.env.FRONTEND_URL}/verify-email?token=${tokenVerifyEmail}`,
|
|
138
|
+
// };
|
|
139
139
|
}
|
|
140
|
-
const template = await compileEmailTemplate({
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
});
|
|
140
|
+
// const template = await compileEmailTemplate({
|
|
141
|
+
// fileName: "workflowTeamMember.mjml",
|
|
142
|
+
// data: dt,
|
|
143
|
+
// });
|
|
144
144
|
|
|
145
|
-
sendMail(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
);
|
|
145
|
+
// sendMail(
|
|
146
|
+
// approval.username,
|
|
147
|
+
// `Get Started with ${req.body.workFlowName} Workflow Now!`,
|
|
148
|
+
// template
|
|
149
|
+
// );
|
|
150
150
|
|
|
151
151
|
let { selectMode, addNew, isText, password, ...rest } = approval;
|
|
152
152
|
approvalsData.push({ user: response.data, ...rest });
|
|
153
153
|
} else {
|
|
154
154
|
}
|
|
155
|
-
} catch (err) {
|
|
155
|
+
} catch (err) {
|
|
156
|
+
console.log("the err are", err)
|
|
157
|
+
}
|
|
156
158
|
})
|
|
157
159
|
);
|
|
158
160
|
}
|
|
@@ -168,6 +170,9 @@ export async function generateWorkflow(req: any) {
|
|
|
168
170
|
});
|
|
169
171
|
|
|
170
172
|
req.body.approvals = approvalsData;
|
|
173
|
+
|
|
174
|
+
console.log('the approvals are',req.body.approvals)
|
|
175
|
+
|
|
171
176
|
await updateWorkFlow(workflow._id, data);
|
|
172
177
|
|
|
173
178
|
return {
|