diff --git a/api/src/users/schemas/user.schema.ts b/api/src/users/schemas/user.schema.ts index a0642e7..56d9ee4 100644 --- a/api/src/users/schemas/user.schema.ts +++ b/api/src/users/schemas/user.schema.ts @@ -21,7 +21,7 @@ export class User { avatar?: string @Prop({ type: String, trim: true }) - phone: string + phone?: string @Prop({ type: String }) password: string diff --git a/api/src/users/users.service.ts b/api/src/users/users.service.ts index 44cd71d..12c2e00 100644 --- a/api/src/users/users.service.ts +++ b/api/src/users/users.service.ts @@ -19,10 +19,12 @@ export class UsersService { name, email, password, + phone, }: { name: string email: string password?: string + phone?: string }) { if (await this.findOne({ email })) { throw new HttpException( @@ -37,6 +39,7 @@ export class UsersService { name, email, password, + phone, }) return await newUser.save() }