mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-30 14:18:22 -05:00
fix: history not tracked on nnas endpoint, not scrubbed
This commit is contained in:
@@ -352,6 +352,7 @@ PNIDSchema.method('scrub', async function scrub() {
|
||||
this.email.reachable = false;
|
||||
this.email.validated = false;
|
||||
this.email.validated_date = '';
|
||||
this.email.history.splice(0);
|
||||
this.email.id = 0;
|
||||
this.region = 0;
|
||||
this.timezone.name = '';
|
||||
|
||||
@@ -735,6 +735,8 @@ router.put('/@me/emails/@primary', async (request: express.Request, response: ex
|
||||
return;
|
||||
}
|
||||
|
||||
pnid.email.history.unshift({ old: pnid.email.address, new: email.address.toLowerCase(), on: new Date() });
|
||||
|
||||
// TODO - Better email check
|
||||
pnid.email.address = email.address.toLowerCase();
|
||||
pnid.email.reachable = false;
|
||||
|
||||
Reference in New Issue
Block a user