Implement email config
This commit is contained in:
parent
0ce64f8c33
commit
1bc109b42c
10 changed files with 280 additions and 13 deletions
|
@ -78,6 +78,8 @@ export interface ILocalUser extends IUserBase {
|
|||
host: null;
|
||||
keypair: string;
|
||||
email: string;
|
||||
emailVerified?: boolean;
|
||||
emailVerifyCode?: string;
|
||||
password: string;
|
||||
token: string;
|
||||
twitter: {
|
||||
|
@ -99,9 +101,6 @@ export interface ILocalUser extends IUserBase {
|
|||
username: string;
|
||||
discriminator: string;
|
||||
};
|
||||
line: {
|
||||
userId: string;
|
||||
};
|
||||
profile: {
|
||||
location: string;
|
||||
birthday: string; // 'YYYY-MM-DD'
|
||||
|
@ -286,6 +285,7 @@ export const pack = (
|
|||
delete _user._id;
|
||||
|
||||
delete _user.usernameLower;
|
||||
delete _user.emailVerifyCode;
|
||||
|
||||
if (_user.host == null) {
|
||||
// Remove private properties
|
||||
|
@ -306,11 +306,11 @@ export const pack = (
|
|||
delete _user.discord.refreshToken;
|
||||
delete _user.discord.expiresDate;
|
||||
}
|
||||
delete _user.line;
|
||||
|
||||
// Visible via only the official client
|
||||
if (!opts.includeSecrets) {
|
||||
delete _user.email;
|
||||
delete _user.emailVerified;
|
||||
delete _user.settings;
|
||||
delete _user.clientSettings;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue