|
|
@ -19,10 +19,12 @@ export class UsersService { |
|
|
name, |
|
|
name, |
|
|
email, |
|
|
email, |
|
|
password, |
|
|
password, |
|
|
|
|
|
phone, |
|
|
}: { |
|
|
}: { |
|
|
name: string |
|
|
name: string |
|
|
email: string |
|
|
email: string |
|
|
password?: string |
|
|
password?: string |
|
|
|
|
|
phone?: string |
|
|
}) { |
|
|
}) { |
|
|
if (await this.findOne({ email })) { |
|
|
if (await this.findOne({ email })) { |
|
|
throw new HttpException( |
|
|
throw new HttpException( |
|
|
@ -37,6 +39,7 @@ export class UsersService { |
|
|
name, |
|
|
name, |
|
|
email, |
|
|
email, |
|
|
password, |
|
|
password, |
|
|
|
|
|
phone, |
|
|
}) |
|
|
}) |
|
|
return await newUser.save() |
|
|
return await newUser.save() |
|
|
} |
|
|
} |
|
|
|