Skip to content

Commit 25d0463

Browse files
authored
Merge pull request #1176 from rocket-admin/backend_fix_get_company_info_saas_request
Backend fix get company info saas request
2 parents d4d308e + 0218404 commit 25d0463

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/src/microservices/saas-microservice/use-cases/register-company-webhook.use.case.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ export class RegisteredCompanyWebhookUseCase
4444
foundUser.role = UserRoleEnum.ADMIN;
4545
await this._dbContext.userRepository.saveUserEntity(foundUser);
4646
const newCompanyInfo = new CompanyInfoEntity();
47-
newCompanyInfo.name = companyName;
47+
newCompanyInfo.name = companyName ? companyName : 'New Company';
4848
newCompanyInfo.id = companyId;
49-
newCompanyInfo.users = [foundUser];
5049
newCompanyInfo.show_test_connections = true;
5150
const savedCompanyInfo = await this._dbContext.companyInfoRepository.save(newCompanyInfo);
51+
foundUser.company = savedCompanyInfo;
5252
const savedUser = await this._dbContext.userRepository.saveUserEntity(foundUser);
5353
return {
5454
userId: savedUser.id,

0 commit comments

Comments
 (0)