aboutsummaryrefslogtreecommitdiffstats
path: root/models/User.js
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2021-08-21 00:24:01 +0200
committerGravatar piotrruss <mail@pruss.it> 2021-08-21 00:24:01 +0200
commita9d3686ccc496044cfdee013ccfbece955793052 (patch)
tree52b7772720ff89b1b6f20070a771776f0b3e9367 /models/User.js
parent9f3c030a33edcf57eb832c500253044d107f6e25 (diff)
downloadmy_apps-a9d3686ccc496044cfdee013ccfbece955793052.tar.gz
my_apps-a9d3686ccc496044cfdee013ccfbece955793052.tar.bz2
my_apps-a9d3686ccc496044cfdee013ccfbece955793052.zip
icon focus, notes update timestamp, loading note
Diffstat (limited to 'models/User.js')
-rw-r--r--models/User.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/User.js b/models/User.js
index ecc54cd..fa3303f 100644
--- a/models/User.js
+++ b/models/User.js
@@ -98,6 +98,8 @@ userSchema.pre('save', async function(next){
user.password = await bcrypt.hash(user.password, 8);
}
+ user.updated_at = Date.now()
+
next()
})