mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 13:40:13 +01:00
workaround an issue with organization not being found, fix needed
This commit is contained in:
@@ -58,6 +58,10 @@ namespace WebApp.Endpoints
|
|||||||
// to zwróć także EventRegistrations. W przeciwnym razie usuń to pole
|
// to zwróć także EventRegistrations. W przeciwnym razie usuń to pole
|
||||||
// przed jego wysłaniem!
|
// przed jego wysłaniem!
|
||||||
if (org is null || org.OrganisationId != Eve.OrganisationId) Eve.EventRegistrations = [];
|
if (org is null || org.OrganisationId != Eve.OrganisationId) Eve.EventRegistrations = [];
|
||||||
|
|
||||||
|
// DLACZEGO?
|
||||||
|
Eve.Organisation = await guhf.GetOrganisationFromId(Eve.OrganisationId);
|
||||||
|
|
||||||
EventDetailsDto EveDto = Eve.ToEventDetailsDto();
|
EventDetailsDto EveDto = Eve.ToEventDetailsDto();
|
||||||
|
|
||||||
return Results.Ok(EveDto); //EventDetailsDto
|
return Results.Ok(EveDto); //EventDetailsDto
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Wysy³a ¿¹danie DELETE do API
|
// Wysy³a ¿¹danie DELETE do API
|
||||||
const response = await fetch(`/api/events/${id}`, {
|
const response = await fetch(`/api/events/${eventId}`, {
|
||||||
method: "DELETE"
|
method: "DELETE"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ document.addEventListener("DOMContentLoaded", () => __awaiter(void 0, void 0, vo
|
|||||||
return;
|
return;
|
||||||
try {
|
try {
|
||||||
// Wysyła żądanie DELETE do API
|
// Wysyła żądanie DELETE do API
|
||||||
const response = yield fetch(`/api/events/${id}`, {
|
const response = yield fetch(`/api/events/${eventId}`, {
|
||||||
method: "DELETE"
|
method: "DELETE"
|
||||||
});
|
});
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user