cosmetics

This commit is contained in:
D065023
2019-12-30 14:12:14 +01:00
parent 78e6138718
commit 28362cc835

View File

@@ -49,11 +49,14 @@ module.exports = cds.service.impl(async () => {
contact
})
const changed = replicas.map(rep => {
const ext = externals.find(ext => ext.ID === rep.ID)
if (ext) return ext
return { ...rep, ...{ tombstone: true } }
})
// Add a tombstone if remote address was deleted
const changed = replicas.map(
rep =>
externals.find(ext => ext.ID === rep.ID) || {
...rep,
...{ tombstone: true }
}
)
// update local replicas with changes from S/4
const local = db.transaction(msg) //> using that variant to benefit from bulk runs