fix: refs #7811 Renew token crash
gitea/salix/pipeline/pr-test This commit looks good Details
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-08-27 10:07:09 +02:00
parent 83f3a05721
commit 2dc095e828
1 changed files with 4 additions and 1 deletions

View File

@ -30,8 +30,11 @@ module.exports = Self => {
// Schedule to remove current token
setTimeout(async() => {
if (await models.AccessToken.findById(token.id))
try {
await Self.logout(token.id);
} catch (error) {
// FIXME: Crash if do throw new Error(error)
}
}, courtesyTime * 1000);
// Get scopes