mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-30 14:18:22 -05:00
fix: clear email history... better?
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import crypto from 'node:crypto';
|
||||
import { Schema, model } from 'mongoose';
|
||||
import { Schema, Types, model } from 'mongoose';
|
||||
import uniqueValidator from 'mongoose-unique-validator';
|
||||
import imagePixels from 'image-pixels';
|
||||
import TGA from 'tga';
|
||||
@@ -19,6 +19,7 @@ import { PasswordResetToken } from '@/models/password-reset-token';
|
||||
import { EmailUpdateEventSchema } from '@/models/email-update-event';
|
||||
import type { IPNID, IPNIDMethods, PNIDModel } from '@/types/mongoose/pnid';
|
||||
import type { PNIDPermissionFlag } from '@/types/common/permission-flags';
|
||||
import { IEmailUpdateEvent } from '@/types/mongoose/email-update-event';
|
||||
|
||||
let stripe: Stripe;
|
||||
|
||||
@@ -352,7 +353,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.history = new Types.DocumentArray<IEmailUpdateEvent>([]);
|
||||
this.email.id = 0;
|
||||
this.region = 0;
|
||||
this.timezone.name = '';
|
||||
|
||||
Reference in New Issue
Block a user