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