Skip to content

Commit b89528d

Browse files
committed
document endpoint removed | send message validated
1 parent 44e0b0b commit b89528d

13 files changed

Lines changed: 15 additions & 270 deletions

MangoAPI.BusinessLogic/Pipelines/CommonFileValidator.cs renamed to MangoAPI.BusinessLogic/ApiCommands/CommonFileValidator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
3-
using FluentValidation;
1+
using FluentValidation;
42
using Microsoft.AspNetCore.Http;
3+
using System.Collections.Generic;
4+
using System.Linq;
55

6-
namespace MangoAPI.BusinessLogic.Pipelines;
6+
namespace MangoAPI.BusinessLogic.ApiCommands;
77

88
public class CommonFileValidator : AbstractValidator<IFormFile>
99
{

MangoAPI.BusinessLogic/Pipelines/CommonImageValidator.cs renamed to MangoAPI.BusinessLogic/ApiCommands/CommonImageValidator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
3-
using FluentValidation;
1+
using FluentValidation;
42
using Microsoft.AspNetCore.Http;
3+
using System.Collections.Generic;
4+
using System.Linq;
55

6-
namespace MangoAPI.BusinessLogic.Pipelines;
6+
namespace MangoAPI.BusinessLogic.ApiCommands;
77

88
public class CommonImageValidator : AbstractValidator<IFormFile>
99
{

MangoAPI.BusinessLogic/ApiCommands/Documents/UploadDocumentCommand.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

MangoAPI.BusinessLogic/ApiCommands/Documents/UploadDocumentCommandHandler.cs

Lines changed: 0 additions & 69 deletions
This file was deleted.

MangoAPI.BusinessLogic/ApiCommands/Documents/UploadDocumentCommandValidator.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

MangoAPI.BusinessLogic/ApiCommands/Documents/UploadDocumentResponse.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

MangoAPI.BusinessLogic/ApiCommands/Messages/SendMessageCommandHandler.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using FluentValidation;
2+
using System;
23
using System.Linq;
34
using System.Threading;
45
using System.Threading.Tasks;
@@ -121,6 +122,8 @@ private async Task<string> UploadAttachmentIfExistsAsync(SendMessageCommand requ
121122
return null;
122123
}
123124

125+
await new CommonFileValidator().ValidateAndThrowAsync(request.Attachment);
126+
124127
var file = request.Attachment;
125128
var uniqueFileName = FileNameHelper.CreateUniqueFileName(file.FileName);
126129

MangoAPI.BusinessLogic/ApiCommands/Users/UpdateProfilePictureCommandValidator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using FluentValidation;
2-
using MangoAPI.BusinessLogic.Pipelines;
32

43
namespace MangoAPI.BusinessLogic.ApiCommands.Users;
54

MangoAPI.BusinessLogic/MangoAPI.BusinessLogic.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<ProjectReference Include="..\MangoAPI.Application\MangoAPI.Application.csproj"/>
13-
<ProjectReference Include="..\MangoAPI.Infrastructure\MangoAPI.Infrastructure.csproj"/>
14-
<ProjectReference Include="..\MangoAPI.Domain\MangoAPI.Domain.csproj"/>
12+
<ProjectReference Include="..\MangoAPI.Application\MangoAPI.Application.csproj" />
13+
<ProjectReference Include="..\MangoAPI.Infrastructure\MangoAPI.Infrastructure.csproj" />
14+
<ProjectReference Include="..\MangoAPI.Domain\MangoAPI.Domain.csproj" />
1515
</ItemGroup>
1616
</Project>

MangoAPI.IntegrationTests/ApiCommandsTests/UploadDocumentCommandHandlerTests/UploadDocumentSuccess.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)