From 544c39311871f6539103deecf076b905c27dd8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Dybvik=20Langfors?= Date: Mon, 11 Mar 2024 19:52:46 +0100 Subject: [PATCH] Change IfMatchDialogRevision to Revision in DTO --- .../Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs | 2 +- .../Features/V1/EndUser/Dialogs/Queries/Get/MappingProfile.cs | 2 +- .../V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs | 2 +- .../V1/ServiceOwner/Dialogs/Queries/Get/MappingProfile.cs | 2 +- .../Endpoints/V1/EndUser/Dialogs/GetDialogEndpoint.cs | 2 +- .../Endpoints/V1/ServiceOwner/Dialogs/GetDialogEndpoint.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs index 54dbd131a..f684c7be2 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs @@ -11,7 +11,7 @@ namespace Digdir.Domain.Dialogporten.Application.Features.V1.EndUser.Dialogs.Que public sealed class GetDialogDto { public Guid Id { get; set; } - public Guid IfMatchDialogRevision { get; set; } + public Guid Revision { get; set; } public string Org { get; set; } = null!; public string ServiceResource { get; set; } = null!; public string Party { get; set; } = null!; diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/MappingProfile.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/MappingProfile.cs index b3ccd1d09..4b72eecd3 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/MappingProfile.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/MappingProfile.cs @@ -12,7 +12,7 @@ internal sealed class MappingProfile : Profile public MappingProfile() { CreateMap() - .ForMember(dest => dest.IfMatchDialogRevision, opt => opt.MapFrom(src => src.Revision)) + .ForMember(dest => dest.Revision, opt => opt.MapFrom(src => src.Revision)) .ForMember(dest => dest.Status, opt => opt.MapFrom(src => src.StatusId)); CreateMap() diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs index 935b5cbbd..683ec16c3 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs @@ -11,7 +11,7 @@ namespace Digdir.Domain.Dialogporten.Application.Features.V1.ServiceOwner.Dialog public sealed class GetDialogDto { public Guid Id { get; set; } - public Guid IfMatchDialogRevision { get; set; } + public Guid Revision { get; set; } public string Org { get; set; } = null!; public string ServiceResource { get; set; } = null!; public string Party { get; set; } = null!; diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/MappingProfile.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/MappingProfile.cs index af5635759..081e4bbb5 100644 --- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/MappingProfile.cs +++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/MappingProfile.cs @@ -12,7 +12,7 @@ internal sealed class MappingProfile : Profile public MappingProfile() { CreateMap() - .ForMember(dest => dest.IfMatchDialogRevision, opt => opt.MapFrom(src => src.Revision)) + .ForMember(dest => dest.Revision, opt => opt.MapFrom(src => src.Revision)) .ForMember(dest => dest.Status, opt => opt.MapFrom(src => src.StatusId)); CreateMap() diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/Dialogs/GetDialogEndpoint.cs b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/Dialogs/GetDialogEndpoint.cs index 15f704af5..9d7ca8a88 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/Dialogs/GetDialogEndpoint.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/EndUser/Dialogs/GetDialogEndpoint.cs @@ -36,7 +36,7 @@ public override async Task HandleAsync(GetDialogQuery req, CancellationToken ct) await result.Match( dto => { - HttpContext.Response.Headers.ETag = dto.IfMatchDialogRevision.ToString(); + HttpContext.Response.Headers.ETag = dto.Revision.ToString(); return SendOkAsync(dto, ct); }, notFound => this.NotFoundAsync(notFound, ct), diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/GetDialogEndpoint.cs b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/GetDialogEndpoint.cs index 2e853c7d4..646ed2073 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/GetDialogEndpoint.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/GetDialogEndpoint.cs @@ -36,7 +36,7 @@ public override async Task HandleAsync(GetDialogQuery req, CancellationToken ct) await result.Match( dto => { - HttpContext.Response.Headers.ETag = dto.IfMatchDialogRevision.ToString(); + HttpContext.Response.Headers.ETag = dto.Revision.ToString(); return SendOkAsync(dto, ct); }, notFound => this.NotFoundAsync(notFound, ct));