Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 37 additions & 13 deletions MeAjudaAi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,24 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{4726175B
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.SearchProviders.Tests", "src\Modules\SearchProviders\Tests\MeAjudaAi.Modules.SearchProviders.Tests.csproj", "{C7F6B6F4-4F9C-C844-500C-87E3802A6C4B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Catalogs", "Catalogs", "{8B551008-B254-EBAF-1B6D-AB7C420234EA}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ServiceCatalogs", "ServiceCatalogs", "{8B551008-B254-EBAF-1B6D-AB7C420234EA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Domain", "Domain", "{B346CC0B-427A-E442-6F5D-8AAE1AB081D6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.ServiceCatalogs.Domain", "src\Modules\ServiceCatalogs\Domain\MeAjudaAi.Modules.ServiceCatalogs.Domain.csproj", "{DC1D1ACD-A21E-4BA0-A22D-77450234BD2A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.ServiceCatalogs.Application", "src\Modules\ServiceCatalogs\Application\MeAjudaAi.Modules.ServiceCatalogs.Application.csproj", "{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{8D23D6D3-2B2E-7F09-866F-FA51CC0FC081}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.ServiceCatalogs.Infrastructure", "src\Modules\ServiceCatalogs\Infrastructure\MeAjudaAi.Modules.ServiceCatalogs.Infrastructure.csproj", "{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{30A2D3C4-AF98-40A1-AA90-ED7C5FE090F8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeAjudaAi.Modules.ServiceCatalogs.API", "src\Modules\ServiceCatalogs\API\MeAjudaAi.Modules.ServiceCatalogs.API.csproj", "{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -573,18 +581,18 @@ Global
{DC1D1ACD-A21E-4BA0-A22D-77450234BD2A}.Release|x64.Build.0 = Release|Any CPU
{DC1D1ACD-A21E-4BA0-A22D-77450234BD2A}.Release|x86.ActiveCfg = Release|Any CPU
{DC1D1ACD-A21E-4BA0-A22D-77450234BD2A}.Release|x86.Build.0 = Release|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Debug|x64.ActiveCfg = Debug|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Debug|x64.Build.0 = Debug|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Debug|x86.ActiveCfg = Debug|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Debug|x86.Build.0 = Debug|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Release|Any CPU.Build.0 = Release|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Release|x64.ActiveCfg = Release|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Release|x64.Build.0 = Release|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Release|x86.ActiveCfg = Release|Any CPU
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7}.Release|x86.Build.0 = Release|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Debug|x64.ActiveCfg = Debug|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Debug|x64.Build.0 = Debug|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Debug|x86.ActiveCfg = Debug|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Debug|x86.Build.0 = Debug|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Release|Any CPU.Build.0 = Release|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Release|x64.ActiveCfg = Release|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Release|x64.Build.0 = Release|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Release|x86.ActiveCfg = Release|Any CPU
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D}.Release|x86.Build.0 = Release|Any CPU
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -597,6 +605,18 @@ Global
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}.Release|x64.Build.0 = Release|Any CPU
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}.Release|x86.ActiveCfg = Release|Any CPU
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7}.Release|x86.Build.0 = Release|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Debug|x64.ActiveCfg = Debug|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Debug|x64.Build.0 = Debug|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Debug|x86.ActiveCfg = Debug|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Debug|x86.Build.0 = Debug|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Release|Any CPU.Build.0 = Release|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Release|x64.ActiveCfg = Release|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Release|x64.Build.0 = Release|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Release|x86.ActiveCfg = Release|Any CPU
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -671,8 +691,12 @@ Global
{8B551008-B254-EBAF-1B6D-AB7C420234EA} = {D55DFAF4-45A1-4C45-AA54-8CE46F0AFB1F}
{B346CC0B-427A-E442-6F5D-8AAE1AB081D6} = {8B551008-B254-EBAF-1B6D-AB7C420234EA}
{DC1D1ACD-A21E-4BA0-A22D-77450234BD2A} = {B346CC0B-427A-E442-6F5D-8AAE1AB081D6}
{44577491-2FC0-4F52-AF5C-2BC9B323CDB7} = {8B551008-B254-EBAF-1B6D-AB7C420234EA}
{A7B8C9D0-1E2F-3A4B-5C6D-7E8F9A0B1C2D} = {44577491-2FC0-4F52-AF5C-2BC9B323CDB7}
{8D23D6D3-2B2E-7F09-866F-FA51CC0FC081} = {8B551008-B254-EBAF-1B6D-AB7C420234EA}
{3B6D6C13-1E04-47B9-B44E-36D25DF913C7} = {8D23D6D3-2B2E-7F09-866F-FA51CC0FC081}
{30A2D3C4-AF98-40A1-AA90-ED7C5FE090F8} = {8B551008-B254-EBAF-1B6D-AB7C420234EA}
{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E} = {30A2D3C4-AF98-40A1-AA90-ED7C5FE090F8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {391B5342-8EC5-4DF0-BCDA-6D73F87E8751}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.Commands.Service;
using MeAjudaAi.Shared.Authorization;
using MeAjudaAi.Shared.Commands;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class ActivateServiceEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapPost("/{id:guid}/activate", ActivateAsync)
.WithName("ActivateService")
.WithSummary("Ativar serviço")
.Produces(StatusCodes.Status204NoContent)
.RequireAdmin();

private static async Task<IResult> ActivateAsync(
Guid id,
ICommandDispatcher commandDispatcher,
CancellationToken cancellationToken)
{
var command = new ActivateServiceCommand(id);
var result = await commandDispatcher.SendAsync<ActivateServiceCommand, Result>(command, cancellationToken);
return HandleNoContent(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.Commands.Service;
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs.Requests.Service;
using MeAjudaAi.Shared.Authorization;
using MeAjudaAi.Shared.Commands;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class ChangeServiceCategoryEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapPost("/{id:guid}/change-category", ChangeAsync)
.WithName("ChangeServiceCategory")
.WithSummary("Alterar categoria do serviço")
.Produces(StatusCodes.Status204NoContent)
.RequireAdmin();

private static async Task<IResult> ChangeAsync(
Guid id,
[FromBody] ChangeServiceCategoryRequest request,
ICommandDispatcher commandDispatcher,
CancellationToken cancellationToken)
{
var command = new ChangeServiceCategoryCommand(id, request.NewCategoryId);
var result = await commandDispatcher.SendAsync<ChangeServiceCategoryCommand, Result>(command, cancellationToken);
return HandleNoContent(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.Commands.Service;
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs;
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs.Requests.Service;
using MeAjudaAi.Shared.Authorization;
using MeAjudaAi.Shared.Commands;
using MeAjudaAi.Shared.Contracts;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class CreateServiceEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapPost("/", CreateAsync)
.WithName("CreateService")
.WithSummary("Criar serviço")
.Produces<Response<ServiceDto>>(StatusCodes.Status201Created)
.RequireAdmin();

private static async Task<IResult> CreateAsync(
[FromBody] CreateServiceRequest request,
ICommandDispatcher commandDispatcher,
CancellationToken cancellationToken)
{
var command = new CreateServiceCommand(request.CategoryId, request.Name, request.Description, request.DisplayOrder);
var result = await commandDispatcher.SendAsync<CreateServiceCommand, Result<ServiceDto>>(command, cancellationToken);

if (!result.IsSuccess)
return Handle(result);

return Handle(result, "GetServiceById", new { id = result.Value!.Id });
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.Commands.Service;
using MeAjudaAi.Shared.Authorization;
using MeAjudaAi.Shared.Commands;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class DeactivateServiceEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapPost("/{id:guid}/deactivate", DeactivateAsync)
.WithName("DeactivateService")
.WithSummary("Desativar serviço")
.Produces(StatusCodes.Status204NoContent)
.RequireAdmin();

private static async Task<IResult> DeactivateAsync(
Guid id,
ICommandDispatcher commandDispatcher,
CancellationToken cancellationToken)
{
var command = new DeactivateServiceCommand(id);
var result = await commandDispatcher.SendAsync<DeactivateServiceCommand, Result>(command, cancellationToken);
return HandleNoContent(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.Commands.Service;
using MeAjudaAi.Shared.Authorization;
using MeAjudaAi.Shared.Commands;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class DeleteServiceEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapDelete("/{id:guid}", DeleteAsync)
.WithName("DeleteService")
.WithSummary("Deletar serviço")
.Produces(StatusCodes.Status204NoContent)
.RequireAdmin();

private static async Task<IResult> DeleteAsync(
Guid id,
ICommandDispatcher commandDispatcher,
CancellationToken cancellationToken)
{
var command = new DeleteServiceCommand(id);
var result = await commandDispatcher.SendAsync<DeleteServiceCommand, Result>(command, cancellationToken);
return HandleNoContent(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs;
using MeAjudaAi.Modules.ServiceCatalogs.Application.Queries.Service;
using MeAjudaAi.Shared.Contracts;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using MeAjudaAi.Shared.Queries;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class GetAllServicesEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapGet("/", GetAllAsync)
.WithName("GetAllServices")
.WithSummary("Listar todos os serviços")
.Produces<Response<IReadOnlyList<ServiceListDto>>>(StatusCodes.Status200OK);

private static async Task<IResult> GetAllAsync(
[AsParameters] GetAllServicesQuery query,
IQueryDispatcher queryDispatcher,
CancellationToken cancellationToken)
{
var result = await queryDispatcher.QueryAsync<GetAllServicesQuery, Result<IReadOnlyList<ServiceListDto>>>(
query, cancellationToken);
return Handle(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs;
using MeAjudaAi.Modules.ServiceCatalogs.Application.Queries.Service;
using MeAjudaAi.Shared.Contracts;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using MeAjudaAi.Shared.Queries;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class GetServiceByIdEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapGet("/{id:guid}", GetByIdAsync)
.WithName("GetServiceById")
.WithSummary("Buscar serviço por ID")
.Produces<Response<ServiceDto>>(StatusCodes.Status200OK)
.Produces(StatusCodes.Status404NotFound);

private static async Task<IResult> GetByIdAsync(
Guid id,
IQueryDispatcher queryDispatcher,
CancellationToken cancellationToken)
{
var query = new GetServiceByIdQuery(id);
var result = await queryDispatcher.QueryAsync<GetServiceByIdQuery, Result<ServiceDto?>>(query, cancellationToken);

if (result.IsSuccess && result.Value is null)
{
return Results.NotFound();
}

return Handle(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs;
using MeAjudaAi.Modules.ServiceCatalogs.Application.Queries.Service;
using MeAjudaAi.Shared.Contracts;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using MeAjudaAi.Shared.Queries;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class GetServicesByCategoryEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapGet("/category/{categoryId:guid}", GetByCategoryAsync)
.WithName("GetServicesByCategory")
.WithSummary("Listar serviços por categoria")
.Produces<Response<IReadOnlyList<ServiceListDto>>>(StatusCodes.Status200OK);

private static async Task<IResult> GetByCategoryAsync(
Guid categoryId,
[AsParameters] GetServicesByCategoryQuery query,
IQueryDispatcher queryDispatcher,
CancellationToken cancellationToken)
{
var queryWithCategory = query with { CategoryId = categoryId };
var result = await queryDispatcher.QueryAsync<GetServicesByCategoryQuery, Result<IReadOnlyList<ServiceListDto>>>(queryWithCategory, cancellationToken);
return Handle(result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using MeAjudaAi.Modules.ServiceCatalogs.Application.Commands.Service;
using MeAjudaAi.Modules.ServiceCatalogs.Application.DTOs.Requests.Service;
using MeAjudaAi.Shared.Authorization;
using MeAjudaAi.Shared.Commands;
using MeAjudaAi.Shared.Endpoints;
using MeAjudaAi.Shared.Functional;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;

namespace MeAjudaAi.Modules.ServiceCatalogs.API.Endpoints.Service;

public class UpdateServiceEndpoint : BaseEndpoint, IEndpoint
{
public static void Map(IEndpointRouteBuilder app)
=> app.MapPut("/{id:guid}", UpdateAsync)
.WithName("UpdateService")
.WithSummary("Atualizar serviço")
.Produces(StatusCodes.Status204NoContent)
.RequireAdmin();

private static async Task<IResult> UpdateAsync(
Guid id,
[FromBody] UpdateServiceRequest request,
ICommandDispatcher commandDispatcher,
CancellationToken cancellationToken)
{
var command = new UpdateServiceCommand(id, request.Name, request.Description, request.DisplayOrder);
var result = await commandDispatcher.SendAsync<UpdateServiceCommand, Result>(command, cancellationToken);
return HandleNoContent(result);
}
}
Loading