feat: basic organization endpoint

This commit is contained in:
2025-05-18 14:20:20 +02:00
parent 9034c058f0
commit eb9fa8b9ca
5 changed files with 83 additions and 3 deletions

View File

@@ -41,10 +41,10 @@ namespace WebApp.Endpoints
// Jeśli token należy do organizacji, która utworzyła to wydarzenie,
// to zwróć także EventRegistrations. W przeciwnym razie usuń to pole
// przed jego wysłaniem!
Eve.ToEventDetailsDto();
if (org is null || org.OrganisationId != Eve.OrganisationId) Eve.EventRegistrations = [];
EventDetailsDto EveDto = Eve.ToEventDetailsDto();
return Results.Ok(Eve); //EventDetailsDto
return Results.Ok(EveDto); //EventDetailsDto
})
.WithName(GetEventEndpointName);