jp-shared 1.0.31 → 1.1.1

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.
@@ -24,20 +24,20 @@ const schema = new mongoose.Schema(
24
24
  type: String,
25
25
  required: [true, "Organization name is required"],
26
26
  trim: true,
27
- minlength: [2, "Organization name must be at least 2 characters long"],
28
- maxlength: [100, "Organization name cannot exceed 100 characters"],
27
+ // minlength: [2, "Organization name must be at least 2 characters long"],
28
+ // maxlength: [100, "Organization name cannot exceed 100 characters"],
29
29
  },
30
30
  normalizedOrganizationName: {
31
31
  type: String,
32
32
  trim: true,
33
- minlength: [
34
- 2,
35
- "Normalized organization name must be at least 2 characters long",
36
- ],
37
- maxlength: [
38
- 100,
39
- "Normalized organization name cannot exceed 100 characters",
40
- ],
33
+ // minlength: [
34
+ // 2,
35
+ // "Normalized organization name must be at least 2 characters long",
36
+ // ],
37
+ // maxlength: [
38
+ // 100,
39
+ // "Normalized organization name cannot exceed 100 characters",
40
+ // ],
41
41
  lowercase: true, // Ensuring normalization for consistent database querying
42
42
  },
43
43
  about: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp-shared",
3
- "version": "1.0.31",
3
+ "version": "1.1.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/utils/index.js CHANGED
@@ -8,4 +8,6 @@ module.exports = {
8
8
  ...require("./token-utils"),
9
9
  ...require("./otp-utils"),
10
10
  ...require("./populate-utils"),
11
+ ...require("./sendEmailOTPReset")
12
+
11
13
  };
@@ -0,0 +1,29 @@
1
+ function resetEmailOTPTemplate(fullName, otpCode) {
2
+ return `
3
+ <!DOCTYPE html>
4
+ <html lang="en">
5
+ <head>
6
+ <meta charset="UTF-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <title>Verification Code</title>
9
+ </head>
10
+ <body style="font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4;">
11
+ <table style="max-width: 400px; margin: 10px auto; padding: 20px; background-color: #ffffff; margin-inline: auto; margin-block: 10px;">
12
+ <tr>
13
+ <td style="text-align: center; padding: 10px;">
14
+ <h2>Ocean Academy</h2>
15
+ <p>Hi ${fullName}</p>
16
+ <p style="font-size: 18px;">Sorry to hear you’re having trouble logging into Ocean Academy Job Portal. We got a message that you forgot your password. If this was you, you can get right back into your account or reset your password now.</p>
17
+ <p>Hi ${otpCode} this is your otp</p>
18
+ <p>This is a System generated mail please do not reply to this.</p>
19
+ <p>© Copyright Ocean Academy 2024</p>
20
+ </td>
21
+ </tr>
22
+
23
+ </table>
24
+ </body>
25
+ </html>
26
+ `;
27
+ }
28
+
29
+ module.exports = resetEmailOTPTemplate;