一段时间之后MongoDB更新集合

时间:2018-06-12 15:40:11

标签: mongodb mongoose

我有以下系列:

{ "_id" : ObjectId("5b0422b086698f39b436aa42"), "_uid" : "bQVAKHg7WWgnANHFiZOleo2FUsi4", "role" : "USER", "documentType" : "CC", "documentNumber" : 123148544, "displayName" : "Carlos Perry", "email" : "CPerry@todo.com", "phoneNumber" : "+573003004545", "photoURL" : "url", "idNetwork" : "idNetwork", "blocked" : false, "blockReason" : "Malware detection", "isDisabled": false, "lastLogin" : 1526313028249 }
{ "_id" : ObjectId("5b0423494bd76b3a308c5115"), "_uid" : "bQVAKHg7WWgnANHFiZOleo2FUsi3", "role" : "USER", "documentType" : "CC", "documentNumber" : 534567878, "displayName" : "Julian Cruz", "email" : "Jcruz@algo.com", "phoneNumber" : "+573003004545", "photoURL" : "url", "idNetwork" : "idNetwork", "blocked" : false, "blockReason" : "Malware detection", "isDisabled" :false, "lastLogin" : 1526313028249 }

我希望在用户登录应用程序五分钟后更新字段"lastLogin",但是在五分钟后找不到更新mongo的方法。

我在 Node JS 9.4.0 Mongo 3.6.2

上使用 Mongoose 5.0.3

0 个答案:

没有答案