test(salix): refs #7272 #7272 fix renew-token.spec

This commit is contained in:
Javier Segarra 2024-05-02 10:36:18 +02:00
parent f0f38c199c
commit ae91486641
1 changed files with 3 additions and 0 deletions

View File

@ -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;