Fix Add tenant id property to user
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
| @@ -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; } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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; } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user