|
@@ -6,9 +6,6 @@ import uniqueValidator from 'mongoose-unique-validator';
|
|
|
import crypto from 'crypto';
|
|
import crypto from 'crypto';
|
|
|
import { getOrCreateModel } from '@growi/core';
|
|
import { getOrCreateModel } from '@growi/core';
|
|
|
|
|
|
|
|
-export const expiredAt = (): Date => {
|
|
|
|
|
- return new Date(Date.now() + 600000);
|
|
|
|
|
-};
|
|
|
|
|
export interface IUserRegistrationOrder {
|
|
export interface IUserRegistrationOrder {
|
|
|
token: string,
|
|
token: string,
|
|
|
email: string,
|
|
email: string,
|
|
@@ -27,6 +24,10 @@ export interface UserRegistrationOrderModel extends Model<UserRegistrationOrderD
|
|
|
createUserRegistrationOrder(email: string): UserRegistrationOrderDocument
|
|
createUserRegistrationOrder(email: string): UserRegistrationOrderDocument
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const expiredAt = (): Date => {
|
|
|
|
|
+ return new Date(Date.now() + 600000);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const schema = new Schema<UserRegistrationOrderDocument, UserRegistrationOrderModel>({
|
|
const schema = new Schema<UserRegistrationOrderDocument, UserRegistrationOrderModel>({
|
|
|
token: { type: String, required: true, unique: true },
|
|
token: { type: String, required: true, unique: true },
|
|
|
email: { type: String, required: true },
|
|
email: { type: String, required: true },
|