Skip to content

Commit a5c2dbf

Browse files
committed
Merge branch 'release/v1.1.0' into main
2 parents c7f2590 + 9d50cdd commit a5c2dbf

File tree

81 files changed

+1284
-383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1284
-383
lines changed

WizardWorldApi/.idea/.idea.WizardWorldApi/.idea/efCoreCommonOptions.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WizardWorldApi/.idea/.idea.WizardWorldApi/.idea/efCoreDialogsState.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WizardWorldApi/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
22
WORKDIR /app
33

44
# Copy csproj and restore as distinct layers
@@ -10,7 +10,7 @@ COPY . .
1010
RUN dotnet publish -c Release -o out
1111

1212
# Build runtime image
13-
FROM mcr.microsoft.com/dotnet/aspnet:5.0
13+
FROM mcr.microsoft.com/dotnet/aspnet:9.0
1414
WORKDIR /app
1515
COPY --from=build-env /app/out .
1616

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace WizardWorld.Application;
2+
3+
public interface IApplicationMarker
4+
{
5+
}

WizardWorldApi/WizardWorld.Application/Requests/Elixirs/Queries/GetElixirs/GetElixirsQuery.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System.Collections.Generic;
22
using MediatR.AspNet;
3-
using Microsoft.CodeAnalysis.CSharp.Syntax;
43
using WizardWorld.Persistance.Models.Elixirs;
5-
using WizardWorld.Persistance.Models.Ingredients;
6-
using WizardWorld.Persistance.Models.Wizards;
74

85
namespace WizardWorld.Application.Requests.Elixirs.Queries.GetElixirs {
96
public class GetElixirsQuery : IQuery<List<ElixirDto>> {

WizardWorldApi/WizardWorld.Application/Requests/Feedback/Commands/SendFeedback/SendFeedbackCommandHandler.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Threading.Tasks;
33
using AutoMapper;
44
using MediatR;
5-
using MediatR.AspNet.Exceptions;
65
using WizardWorld.Application.Services.EmailProviders;
76

87
namespace WizardWorld.Application.Requests.Feedback.Commands.SendFeedback {
@@ -13,10 +12,10 @@ public SendFeedbackCommandHandler(IMapper mapper, IEmailProvider provider) {
1312
_mapper = mapper;
1413
_provider = provider;
1514
}
16-
public async Task<Unit> Handle(SendFeedbackCommand request, CancellationToken cancellationToken) {
15+
public async Task Handle(SendFeedbackCommand request, CancellationToken cancellationToken) {
1716
var response = await _provider.SendFeedbackEmailAsync(_mapper.Map<FeedbackEmail>(request));
18-
if (response.StatusCode == System.Net.HttpStatusCode.Accepted) {
19-
return Unit.Value;
17+
if (response.IsSuccess) {
18+
return;
2019
}
2120

2221
throw new EmailServiceFailureException("Email service failed");
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
using System;
22
using System.Collections.Generic;
3-
using WizardWorld.Persistance.Models.Houses;
43

54
namespace WizardWorld.Application.Requests.Houses {
65
public class HouseDto {
7-
public Guid Id { get; set; }
8-
public string Name { get; set; }
9-
public string HouseColours { get; set; }
10-
public string Founder { get; set; }
11-
public string Animal { get; set; }
12-
public string Element { get; set; }
13-
public string Ghost { get; set; }
14-
public string CommonRoom { get; set; }
15-
public ICollection<HouseHeadDto> Heads { get; set; }
16-
public ICollection<TraitDto> Traits { get; set; }
17-
}
6+
public Guid Id { get; set; }
7+
public string Name { get; set; }
8+
public string HouseColours { get; set; }
9+
public string Founder { get; set; }
10+
public string Animal { get; set; }
11+
public string Element { get; set; }
12+
public string Ghost { get; set; }
13+
public string CommonRoom { get; set; }
14+
public ICollection<HouseHeadDto> Heads { get; set; }
15+
public ICollection<TraitDto> Traits { get; set; }
16+
}
1817
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using System;
2-
using MediatR.AspNet;
1+
using MediatR.AspNet;
2+
using System;
33

44
namespace WizardWorld.Application.Requests.Houses.Queries.GetHouseById {
55
public class GetHouseByIdQuery : IQuery<HouseDto> {
6-
public Guid Id { get; set; }
7-
}
6+
public Guid Id { get; set; }
7+
}
88
}
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
using System.Threading;
2-
using System.Threading.Tasks;
3-
using AutoMapper;
1+
using AutoMapper;
42
using MediatR;
53
using MediatR.AspNet.Exceptions;
64
using Microsoft.EntityFrameworkCore;
5+
using System.Threading;
6+
using System.Threading.Tasks;
77
using WizardWorld.Persistance;
88
using WizardWorld.Persistance.Models.Houses;
99

1010
namespace WizardWorld.Application.Requests.Houses.Queries.GetHouseById {
11-
public class GetHouseByIdQueryHandler : IRequestHandler<GetHouseByIdQuery, HouseDto> {
12-
private readonly ApplicationDbContext _context;
13-
private readonly IMapper _mapper;
11+
public class GetHouseByIdQueryHandler : IRequestHandler<GetHouseByIdQuery, HouseDto> {
12+
private readonly ApplicationDbContext _context;
13+
private readonly IMapper _mapper;
1414

15-
public GetHouseByIdQueryHandler(ApplicationDbContext context, IMapper mapper) {
16-
_context = context;
17-
_mapper = mapper;
18-
}
15+
public GetHouseByIdQueryHandler(ApplicationDbContext context, IMapper mapper) {
16+
_context = context;
17+
_mapper = mapper;
18+
}
1919

2020
public async Task<HouseDto> Handle(GetHouseByIdQuery request, CancellationToken cancellationToken) {
2121
var houseEntity = await _context.Houses
@@ -27,7 +27,7 @@ public async Task<HouseDto> Handle(GetHouseByIdQuery request, CancellationToken
2727
throw new NotFoundException(typeof(House), request.Id.ToString());
2828
}
2929

30-
return _mapper.Map<HouseDto>(houseEntity);
31-
}
32-
}
30+
return _mapper.Map<HouseDto>(houseEntity);
31+
}
32+
}
3333
}

WizardWorldApi/WizardWorld.Application/Requests/Houses/Queries/GetHouses/GetHousesQuery.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Collections.Generic;
22
using MediatR.AspNet;
3-
using WizardWorld.Persistance.Models.Houses;
43

54
namespace WizardWorld.Application.Requests.Houses.Queries.GetHouses {
65
public class GetHousesQuery : IQuery<List<HouseDto>> { }

0 commit comments

Comments
 (0)