Socket connection now works
- Pairing a new device works (I did a lot since the last commit)
This commit is contained in:
@@ -4,11 +4,14 @@ import { IUser } from '../user/user.interface';
|
||||
export interface IPhone extends Document {
|
||||
androidId: String,
|
||||
displayName: String,
|
||||
modelName: String,
|
||||
modelName: string,
|
||||
operatingSystem: String,
|
||||
architecture: String,
|
||||
user: IUser,
|
||||
active: Boolean,
|
||||
approval: {
|
||||
approvedOn?: Date,
|
||||
code: String
|
||||
},
|
||||
updatedAt?: Date,
|
||||
createdAt?: Date
|
||||
}
|
||||
@@ -8,7 +8,10 @@ const schemaPhone = new Schema({
|
||||
operatingSystem: { type: String, required: false },
|
||||
architecture: { type: String, required: false },
|
||||
user: { type: SchemaTypes.ObjectId, required: true },
|
||||
active: { type: Boolean, required: true }
|
||||
approval: {
|
||||
approvedOn: { type: Date, required: false },
|
||||
code: { type: String, required: true }
|
||||
}
|
||||
}, {
|
||||
timestamps: {
|
||||
createdAt: true,
|
||||
|
||||
@@ -12,7 +12,5 @@ export interface IUser extends Document {
|
||||
salt: string,
|
||||
type: UserType,
|
||||
lastLogin: Date,
|
||||
twoFASecret?: string,
|
||||
brokerToken: string,
|
||||
createdAt?: Date
|
||||
twoFASecret?: string
|
||||
}
|
||||
@@ -6,7 +6,6 @@ const schemaUser = new Schema({
|
||||
salt: { type: String, required: true },
|
||||
type: { type: String, required: true, default: 'user' }, // This could be user, admin, guest
|
||||
twoFASecret: { type: String, required: false },
|
||||
brokerToken: { type: String, required: true },
|
||||
lastLogin: { type: Date, required: true, default: Date.now },
|
||||
}, {
|
||||
timestamps: {
|
||||
|
||||
Reference in New Issue
Block a user