in services/shared/apps/tenant-registration/src/registration/registration.service.ts [50:72]
private async store(dto: CreateRegistrationDto) {
const tenantId = uuid();
const newTenant = new Registration(
tenantId,
dto.email,
dto.plan,
dto.companyName,
);
const client = this.clientFac.client;
const item = {
tenant_id: newTenant.tenantId,
email: newTenant.email,
plan: newTenant.plan.toString(),
companyName: newTenant.companyName,
};
const cmd = new PutCommand({
Item: item,
TableName: this.tableName,
});
const res = await client.send(cmd);
console.log('Successfully stored tenant', res.Attributes);
return newTenant;
}