mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	allow specifying date created in the ETAPI, #4199
This commit is contained in:
		@@ -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
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user