parent
f0f38c199c
commit
ae91486641
|
@ -18,6 +18,9 @@ module.exports = Self => {
|
|||
Self.renewToken = async function(ctx) {
|
||||
const {accessToken: token} = ctx.req;
|
||||
|
||||
const {courtesyTime} = await models.AccessTokenConfig.findOne({
|
||||
fields: ['courtesyTime']
|
||||
});
|
||||
const isNotExceeded = await Self.validateToken(ctx);
|
||||
if (isNotExceeded)
|
||||
return token;
|
||||
|
|
Loading…
Reference in New Issue