Convert array buffer to regular buffers through processes

This commit is contained in:
nolan 2020-07-24 12:34:46 -07:00
parent da61ec0712
commit 6ddc625459
2 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,8 @@ class MongoDBProvider extends Provider {
return new Promise((resolve, reject) => {
if(data.buffer) data.buffer = Buffer.from(data.buffer);
this.db.collection(collection).insertOne(data, (err, result) => {
if(err) reject(err);

View File

@ -133,6 +133,8 @@ class MessageCache extends Observer {
return null;
});
console.log(buffer);
if(buffer) {
try {
const result = await this.client.transactionHandler.send({