refs #6264 perf: remove field's query
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2023-12-12 19:43:32 +01:00
parent 0ae75d973f
commit 8441877f36
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ module.exports = Self => {
const isValid = await Self.validateToken(token);
if (isValid) throw new UserError(`The renew period has not been exceeded`, 'periodNotExceeded');
const {courtesyTime} = await models.AccessTokenConfig.findOne({fields: ['renewPeriod', 'courtesyTime']});
const {courtesyTime} = await models.AccessTokenConfig.findOne({fields: ['courtesyTime']});
// Schedule to remove current token
handlePromiseLogout(Self, token, courtesyTime);