mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-12-22 12:32:18 -06:00
0.4.10
This commit is contained in:
@@ -35,6 +35,7 @@ module.exports = async (instanceName, options, progressBars, conn, connInstance)
|
||||
const collection = (!file.secondaryConnection ? conn : connInstance).collection(collectionName)
|
||||
|
||||
const data = JSON.parse(fs.readFileSync(file.path, 'utf8'))
|
||||
if (Array.isArray(data)) continue
|
||||
data._id = file.path.split('\\').pop().split('.')[0]
|
||||
await collection.findOneAndUpdate({ _id: data._id }, { $set: data }, { upsert: true })
|
||||
progress.increment()
|
||||
|
||||
Reference in New Issue
Block a user