we don't create companies for personal domain emails anylonger (#10110)
and we reomve an usued function
This commit is contained in:
@ -100,32 +100,6 @@ export class CreateCompanyService {
|
||||
};
|
||||
}
|
||||
|
||||
async createCompany(
|
||||
company: CompanyToCreate,
|
||||
workspaceId: string,
|
||||
transactionManager?: EntityManager,
|
||||
): Promise<string> {
|
||||
const companyRepository =
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace(
|
||||
workspaceId,
|
||||
CompanyWorkspaceEntity,
|
||||
);
|
||||
let lastCompanyPosition = await this.getLastCompanyPosition(
|
||||
companyRepository,
|
||||
transactionManager,
|
||||
);
|
||||
|
||||
const data = await this.prepareCompanyData(company, ++lastCompanyPosition);
|
||||
|
||||
const createdCompany = await companyRepository.save(
|
||||
data,
|
||||
undefined,
|
||||
transactionManager,
|
||||
);
|
||||
|
||||
return createdCompany.id;
|
||||
}
|
||||
|
||||
private async prepareCompanyData(
|
||||
company: CompanyToCreate,
|
||||
position: number,
|
||||
|
||||
Reference in New Issue
Block a user