Fix Add tenant id property to user

This commit is contained in:
2025-08-31 18:01:35 -06:00
parent 95e64b8431
commit 8b0a0c6bc8
3 changed files with 5 additions and 4 deletions

View File

@@ -75,6 +75,8 @@ namespace Core.Thalos.BFF.Api.Controllers
if (string.IsNullOrEmpty(newUser.RoleId)) return BadRequest("Invalid role id");
if (string.IsNullOrEmpty(newUser.TenantId)) return BadRequest("Invalid tenant id");
return await Handle(() => thalosServiceClient.CreateUserService(newUser, cancellationToken)).ConfigureAwait(false);
}
catch (Exception ex)
@@ -170,8 +172,6 @@ namespace Core.Thalos.BFF.Api.Controllers
if (string.IsNullOrEmpty(request.RoleId)) return BadRequest("Invalid role id");
if (!request.Companies.Any()) return BadRequest("The user must contain at least one company");
return await Handle(() => thalosServiceClient.UpdateUserService(request, cancellationToken)).ConfigureAwait(false);
}
catch (Exception ex)

View File

@@ -7,6 +7,7 @@
public string? MiddleName { get; set; }
public string LastName { get; set; } = null!;
public string RoleId { get; set; } = null!;
public string TenantId { get; set; } = null!;
public bool SendInvitation { get; set; }
}
}

View File

@@ -10,8 +10,8 @@ namespace Core.Thalos.Application.UseCases.Users.Input
public string? MiddleName { get; set; }
public string LastName { get; set; } = null!;
public string RoleId { get; set; } = null!;
public string[] Companies { get; set; } = null!;
public string[]? Projects { get; set; }
public string TenantId { get; set; } = null!;
public StatusEnum Status { get; set; }
}
}