Browse Source

fix(api): fix phone no not getting saved during signup

pull/28/head
isra el 1 year ago
parent
commit
d485219c68
  1. 2
      api/src/users/schemas/user.schema.ts
  2. 3
      api/src/users/users.service.ts

2
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

3
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()
}

Loading…
Cancel
Save