q-koa 10.8.3 → 10.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -198,6 +198,16 @@ exports.login = async (ctx) => {
198
198
  user: tokenResult,
199
199
  })
200
200
 
201
+ if (
202
+ result.updated_at &&
203
+ moment().diff(moment(result.updated_at), 'hours') > 24
204
+ ) {
205
+ app.model.user.upsert({
206
+ id: result.id,
207
+ updated_at: moment(),
208
+ })
209
+ }
210
+
201
211
  return ctx.SUCCESS({
202
212
  token,
203
213
  user: app.appConfig.loginData
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "10.8.3",
3
+ "version": "10.8.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {