allow specifying date created in the ETAPI, #4199

This commit is contained in:
zadam
2023-08-30 00:11:32 +02:00
parent 515c5411a6
commit 041758766a
9 changed files with 396 additions and 439 deletions

View File

@@ -1,4 +1,5 @@
const noteTypeService = require("../services/note_types");
const dateUtils = require("../services/date_utils");
function mandatory(obj) {
if (obj === undefined ) {
@@ -22,6 +23,22 @@ function isString(obj) {
}
}
function isLocalDateTime(obj) {
if (obj === undefined || obj === null) {
return;
}
return dateUtils.validateLocalDateTime(obj);
}
function isUtcDateTime(obj) {
if (obj === undefined || obj === null) {
return;
}
return dateUtils.validateUtcDateTime(obj);
}
function isBoolean(obj) {
if (obj === undefined || obj === null) {
return;
@@ -99,5 +116,7 @@ module.exports = {
isNoteId,
isNoteType,
isAttributeType,
isValidEntityId
isValidEntityId,
isLocalDateTime,
isUtcDateTime
};