@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.
package/dist/helpers/utils.js
CHANGED
|
@@ -556,10 +556,8 @@ function formatDateIfNeeded(value) {
|
|
|
556
556
|
if (!value)
|
|
557
557
|
return value;
|
|
558
558
|
function isStrictISODate(val) {
|
|
559
|
-
|
|
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);
|
|
@@ -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