mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 10:46:17 +00:00
Merge pull request #183 from SyncrowIOT/fix-some-issues-in-invite-user
Fix some issues in invite user
This commit is contained in:
@ -34,7 +34,7 @@ export class InviteUserEntity extends AbstractEntity<InviteUserDto> {
|
||||
email: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
})
|
||||
jobTitle: string;
|
||||
|
||||
@ -52,7 +52,7 @@ export class InviteUserEntity extends AbstractEntity<InviteUserDto> {
|
||||
})
|
||||
public lastName: string;
|
||||
@Column({
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
})
|
||||
public phoneNumber: string;
|
||||
|
||||
|
@ -38,16 +38,16 @@ export class AddUserInvitationDto {
|
||||
@ApiProperty({
|
||||
description: 'The job title of the user',
|
||||
example: 'Software Engineer',
|
||||
required: true,
|
||||
required: false,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public jobTitle: string;
|
||||
@IsOptional()
|
||||
public jobTitle?: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'The phone number of the user',
|
||||
example: '+1234567890',
|
||||
required: true,
|
||||
required: false,
|
||||
})
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
|
@ -46,6 +46,7 @@ export class InviteUserService {
|
||||
|
||||
try {
|
||||
const userRepo = queryRunner.manager.getRepository(UserEntity);
|
||||
await this.checkEmailAndProject({ email });
|
||||
|
||||
const user = await userRepo.findOne({
|
||||
where: {
|
||||
|
Reference in New Issue
Block a user