From a9d3686ccc496044cfdee013ccfbece955793052 Mon Sep 17 00:00:00 2001 From: piotrruss Date: Sat, 21 Aug 2021 00:24:01 +0200 Subject: icon focus, notes update timestamp, loading note --- models/User.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'models/User.js') 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() }) -- cgit v1.2.3