howdyai / botkit-storage-mongo

A MongoDB storage driver for Botkit
MIT License
54 stars 42 forks source link

Error when incrementing with save #35

Open ilyago opened 5 years ago

ilyago commented 5 years ago

UnhandledPromiseRejectionWarning: MongoError: The dollar ($) prefixed field '$inc' in '$inc' is not valid for storage

      var user = {id: uid, $inc: {ref: 1}}
      controller.storage.users.save(user);

is there any way I can do that without setting the separate findOneAndUpdate update option?