mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-31 04:59:29 +02:00
fix: improve token management
This commit is contained in:
@@ -50,6 +50,13 @@ const verify = async (
|
||||
});
|
||||
if (user.emails?.length) user.emails[0].default = true;
|
||||
}
|
||||
if (!user.accessTokenDates) {
|
||||
user.accessTokenDates = {
|
||||
github: new Date(),
|
||||
};
|
||||
} else {
|
||||
user.accessTokenDates.github = new Date();
|
||||
}
|
||||
await user.save();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user