generated from cms/tibi-docs
zwischenstand
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
backup.updateLogs = updateLogs
|
||||
return { data: backup }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} entry
|
||||
* @param {string} collectionName
|
||||
* @param {number} versionNr
|
||||
* @returns
|
||||
*/
|
||||
function compareAndUpdateEntry(entry, collectionName, versionNr) {
|
||||
let updateLogs
|
||||
if (versionNr == 0) {
|
||||
@@ -25,6 +32,11 @@
|
||||
return updateLogs
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {any[]} array
|
||||
* @returns {any[]}
|
||||
*/
|
||||
function filterValidObjects(array) {
|
||||
return array.filter((object) => {
|
||||
for (let key in object) {
|
||||
@@ -35,6 +47,14 @@
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} oldObj
|
||||
* @param {Object} newObj
|
||||
* @param {string} path
|
||||
* @returns {any[]}
|
||||
*/
|
||||
function getUpdateLogs(oldObj = {}, newObj = {}, path = "") {
|
||||
let updateLogs = []
|
||||
const ignoredKeys = ["id", "insertTime", "updateTime"]
|
||||
|
||||
Reference in New Issue
Block a user