From d6ae4416a111f02e26a13286603eab88e280fd55 Mon Sep 17 00:00:00 2001 From: Timo Notheisen Date: Fri, 5 Apr 2024 09:05:00 +0200 Subject: [PATCH] refactor: rename Content to CreationContent in request to create a relationship --- .../Commands/CreateRelationship/CreateRelationshipCommand.cs | 2 +- .../CreateRelationship/CreateRelationshipRequestValidator.cs | 2 +- .../Relationships/Commands/CreateRelationship/Handler.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipCommand.cs b/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipCommand.cs index 0d6f8e547e..deddcf98e1 100644 --- a/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipCommand.cs +++ b/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipCommand.cs @@ -7,5 +7,5 @@ namespace Backbone.Modules.Relationships.Application.Relationships.Commands.Crea public class CreateRelationshipCommand : IRequest { public required string RelationshipTemplateId { get; set; } - public byte[]? Content { get; set; } + public byte[]? CreationContent { get; set; } } diff --git a/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipRequestValidator.cs b/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipRequestValidator.cs index efc5cdfda1..d75b9eeed2 100644 --- a/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipRequestValidator.cs +++ b/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/CreateRelationshipRequestValidator.cs @@ -10,6 +10,6 @@ public class CreateRelationshipCommandValidator : AbstractValidator c.RelationshipTemplateId).DetailedNotEmpty(); - RuleFor(c => c.Content).NumberOfBytes(0, 10.Mebibytes()); + RuleFor(c => c.CreationContent).NumberOfBytes(0, 10.Mebibytes()); } } diff --git a/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/Handler.cs b/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/Handler.cs index 2d35e797df..a9e8a30f7c 100644 --- a/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/Handler.cs +++ b/Modules/Relationships/src/Relationships.Application/Relationships/Commands/CreateRelationship/Handler.cs @@ -69,7 +69,7 @@ private async Task CreateAndSaveRelationship() _template, _activeIdentity, _activeDevice, - _request.Content, + _request.CreationContent, existingRelationships.ToList() );