Add tenant services and delete services

This commit is contained in:
2025-08-07 18:37:26 -06:00
parent 6a055bc3db
commit 69e21e276c
30 changed files with 385 additions and 30 deletions

View File

@@ -21,7 +21,7 @@ namespace Core.Thalos.BFF.Api.Controllers
public class RoleController(IThalosServiceClient thalosServiceClient, ILogger<RoleController> logger) : BaseController(logger)
{
/// <summary>
/// Gets all the roles.
/// Gets all roles.
/// </summary>
[HttpGet("GetAll")]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -101,7 +101,7 @@ namespace Core.Thalos.BFF.Api.Controllers
{
logger.LogInformation($"{nameof(GetRoleByIdService)} - Request received - Payload: {JsonSerializer.Serialize(request)}");
if (string.IsNullOrEmpty(request.Id)) return BadRequest("Invalid role identifier");
if (string.IsNullOrEmpty(request._Id)) return BadRequest("Invalid role identifier");
return await Handle(() => thalosServiceClient.GetRoleByIdService(request, cancellationToken)).ConfigureAwait(false);
}
@@ -133,7 +133,7 @@ namespace Core.Thalos.BFF.Api.Controllers
if (string.IsNullOrEmpty(request.Name)) return BadRequest("Invalid role name");
if (string.IsNullOrEmpty(request.Id)) return BadRequest("Invalid role identifier");
if (string.IsNullOrEmpty(request._Id)) return BadRequest("Invalid role identifier");
if (string.IsNullOrEmpty(request.Description)) return BadRequest("Invalid role description");
@@ -172,7 +172,7 @@ namespace Core.Thalos.BFF.Api.Controllers
{
logger.LogInformation($"{nameof(ChangeRoleStatusService)} - Request received - Payload: {JsonSerializer.Serialize(request)}");
if (string.IsNullOrEmpty(request.Id)) { return BadRequest("Invalid role identifier"); }
if (string.IsNullOrEmpty(request._Id)) { return BadRequest("Invalid role identifier"); }
return await Handle(() => thalosServiceClient.ChangeRoleStatusService(request, cancellationToken)).ConfigureAwait(false);
}