diff --git a/WebApp/Endpoints/EventsEndpoints.cs b/WebApp/Endpoints/EventsEndpoints.cs index bae5da7..39f2966 100644 --- a/WebApp/Endpoints/EventsEndpoints.cs +++ b/WebApp/Endpoints/EventsEndpoints.cs @@ -58,6 +58,10 @@ namespace WebApp.Endpoints // to zwróć także EventRegistrations. W przeciwnym razie usuÅ„ to pole // przed jego wysÅ‚aniem! if (org is null || org.OrganisationId != Eve.OrganisationId) Eve.EventRegistrations = []; + + // DLACZEGO? + Eve.Organisation = await guhf.GetOrganisationFromId(Eve.OrganisationId); + EventDetailsDto EveDto = Eve.ToEventDetailsDto(); return Results.Ok(EveDto); //EventDetailsDto diff --git a/WebApp/ts/eventView.ts b/WebApp/ts/eventView.ts index c906b0f..922d950 100644 --- a/WebApp/ts/eventView.ts +++ b/WebApp/ts/eventView.ts @@ -77,7 +77,7 @@ document.addEventListener("DOMContentLoaded", async () => { try { // Wysy³a ¿¹danie DELETE do API - const response = await fetch(`/api/events/${id}`, { + const response = await fetch(`/api/events/${eventId}`, { method: "DELETE" }); diff --git a/WebApp/wwwroot/js/eventView.js b/WebApp/wwwroot/js/eventView.js index c150877..3b88e16 100644 --- a/WebApp/wwwroot/js/eventView.js +++ b/WebApp/wwwroot/js/eventView.js @@ -79,7 +79,7 @@ document.addEventListener("DOMContentLoaded", () => __awaiter(void 0, void 0, vo return; try { // WysyÅ‚a żądanie DELETE do API - const response = yield fetch(`/api/events/${id}`, { + const response = yield fetch(`/api/events/${eventId}`, { method: "DELETE" }); if (response.ok) {