Skip to content

Commit f59222a

Browse files
Merge pull request #2512 from ita-social-projects/feature/issue-2299
Removed unnecessary api/Image/GetAll endpoint
2 parents b167ad6 + 7fe3ed4 commit f59222a

File tree

5 files changed

+0
-204
lines changed

5 files changed

+0
-204
lines changed

Streetcode/Streetcode.BLL/MediatR/Media/Image/GetAll/GetAllImagesHandler.cs

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

Streetcode/Streetcode.BLL/MediatR/Media/Image/GetAll/GetAllImagesQuery.cs

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

Streetcode/Streetcode.WebApi/Controllers/Media/Images/ImageController.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.AspNetCore.Mvc;
22
using Streetcode.BLL.DTO.Media.Images;
3-
using Streetcode.BLL.MediatR.Media.Image.GetAll;
43
using Streetcode.BLL.MediatR.Media.Image.GetBaseImage;
54
using Streetcode.BLL.MediatR.Media.Image.GetById;
65
using Streetcode.BLL.MediatR.Media.Image.GetByStreetcodeId;
@@ -15,13 +14,6 @@ namespace Streetcode.WebApi.Controllers.Media.Images;
1514

1615
public class ImageController : BaseApiController
1716
{
18-
[HttpGet]
19-
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(IEnumerable<ImageDTO>))]
20-
public async Task<IActionResult> GetAll()
21-
{
22-
return HandleResult(await Mediator.Send(new GetAllImagesQuery()));
23-
}
24-
2517
[HttpGet("{streetcodeId:int}")]
2618
[ValidateStreetcodeExistence]
2719
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(IEnumerable<ImageDTO>))]

Streetcode/Streetcode.XIntegrationTest/ControllerTests/Media/Images/ImageControllerTests.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,6 @@ public ImageControllerTests(CustomWebApplicationFactory<Program> factory)
2929
Guid.NewGuid().ToString());
3030
}
3131

32-
[Fact]
33-
public async Task GetAllReturn_SuccessStatusCode()
34-
{
35-
var response = await this.Client.GetAllAsync();
36-
var returnedValue = CaseIsensitiveJsonDeserializer.Deserialize<IEnumerable<ImageDTO>>(response.Content);
37-
38-
Assert.Multiple(
39-
() => Assert.True(response.IsSuccessStatusCode),
40-
() => Assert.NotNull(returnedValue));
41-
}
42-
4332
[Fact]
4433
public async Task GetById_ReturnSuccessStatusCode()
4534
{

Streetcode/Streetcode.XUnitTest/MediatRTests/Media/Image/GetAllImageTests/GetAllImagesTest.cs

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

0 commit comments

Comments
 (0)