17:17 09/10

This commit is contained in:
2025-10-09 17:17:42 +02:00
parent 1734ec0219
commit 91b4aca2fa
76 changed files with 815 additions and 388 deletions

View File

@@ -1,20 +1,20 @@
using PyroFetes.DTO.Effect.Response;
using API.DTO.Effect.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Effect;
public class GetAllEffectsEndpoint(PyroFetesDbContext appDbContext) : EndpointWithoutRequest<List<GetEffectDto>>
public class GetAllEffectsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : EndpointWithoutRequest<List<GetEffectDto>>
{
public override void Configure()
{
Get("/api/effects");
Get("/effects");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)
{
List<GetEffectDto> responseDto = await appDbContext.Effects
List<GetEffectDto> responseDto = await pyrofetesdbcontext.Effects
.Select(a => new GetEffectDto
{
Id = a.Id,