5554-renovar_token #1566

Merged
vicent merged 24 commits from 5554-renovar_token into dev 2023-06-20 12:38:47 +00:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit f471d62d41 - Show all commits

View File

@ -33,8 +33,9 @@ module.exports = Self => {
return response;
vicent marked this conversation as resolved Outdated
Outdated
Review

Devolver un 'UserError' si todavía no se ha pasado el tiempo de renovación.

Devolver un 'UserError' si todavía no se ha pasado el tiempo de renovación.
}
const accessToken = await models.AccessToken.create({userId: userId});
await models.AccessToken.destroyById(tokenId);
await Self.logout(tokenId);
const user = await Self.findById(userId);
const accessToken = await user.createAccessToken();
return {token: accessToken.id, created: accessToken.created};
};