@kipicore/dbcore 1.1.154 → 1.1.156

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.
@@ -556,10 +556,8 @@ function formatDateIfNeeded(value) {
556
556
  if (!value)
557
557
  return value;
558
558
  function isStrictISODate(val) {
559
- return /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?Z?)?$/.test(val);
560
- }
561
- if (value instanceof Date) {
562
- return value.toLocaleDateString('en-GB');
559
+ const isoRegex = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d\.\d{3}Z$/;
560
+ return isoRegex.test(val);
563
561
  }
564
562
  if (typeof value === 'string' && isStrictISODate(value)) {
565
563
  const parsed = new Date(value);
@@ -44,4 +44,5 @@ export interface IBlogModelAttributes extends IDefaultAttributes, Document {
44
44
  slug: string;
45
45
  shareList: IShareListSchema[];
46
46
  coverImage: string;
47
+ linkList: string[];
47
48
  }
@@ -72,6 +72,7 @@ const blogModelSchema = new mongoose_1.Schema({
72
72
  feedBackId: { type: String, required: false },
73
73
  academicCalendarId: { type: String, required: true },
74
74
  files: { type: [String], default: [] },
75
+ linkList: { type: [String], default: [] },
75
76
  comment: { type: [CommentSchema], default: [] },
76
77
  like: { type: [LikeSchema], default: [] },
77
78
  approveBy: { type: String, required: false },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.154",
3
+ "version": "1.1.156",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",