Add applying to event

This commit is contained in:
AleksDw
2025-06-01 17:13:47 +02:00
parent b440a0334c
commit 7e3759927f
5 changed files with 104 additions and 13 deletions

View File

@@ -35,3 +35,13 @@ export function getMyAccount() {
return data;
});
}
export function getMyRegisteredEventIds() {
return __awaiter(this, void 0, void 0, function* () {
const res = yield fetch("/api/auth/my_events");
if (!res.ok) {
throw Error("Użytkownik niezalogowany!");
}
const events = yield res.json();
return events.map((event) => event.eventId);
});
}