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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-typescript-library-rahul52us",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "A reusable TypeScript utility library.",
5
5
  "main": "dist/server.js",
6
6
  "types": "dist/types/server.d.ts",
@@ -91,6 +91,7 @@ export const createWorkFlowUserService = async (userData: any) => {
91
91
  };
92
92
  }
93
93
  } catch (err) {
94
+ console.log('the workflow user created error', err)
94
95
  return {
95
96
  status: "error",
96
97
  data: err?.message,
@@ -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
- 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
- };
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
- fileName: "workflowTeamMember.mjml",
142
- data: dt,
143
- });
140
+ // const template = await compileEmailTemplate({
141
+ // fileName: "workflowTeamMember.mjml",
142
+ // data: dt,
143
+ // });
144
144
 
145
- sendMail(
146
- approval.username,
147
- `Get Started with ${req.body.workFlowName} Workflow Now!`,
148
- template
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 {