#7272 - BUG Redirect To Login when ACL not exists #2371

Merged
jsegarra merged 19 commits from 7272_bug_redirectToLogin into dev 2024-05-27 06:56:20 +00:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit ae91486641 - Show all commits

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;