fix: fix acces for logged out visitors

This commit is contained in:
2025-05-19 04:54:06 +02:00
parent ace54fb4ef
commit 07702b93b1
6 changed files with 62 additions and 46 deletions

View File

@@ -13,17 +13,19 @@ const urlParams = new URLSearchParams(queryString);
const eventId = urlParams.get('event');
document.addEventListener("DOMContentLoaded", () => __awaiter(void 0, void 0, void 0, function* () {
var container = document.getElementById("mainContainer");
var user = yield getMyAccount();
var org_id = -1;
const modifyBtn = document.getElementById("editBtn");
const removeBtn = document.getElementById("removeBtn");
if (user) {
if (user.isOrganisation) {
org_id = user.organisationId;
var org_id = -1;
try {
var user = yield getMyAccount();
if (user) {
if (user.isOrganisation) {
org_id = user.organisationId;
}
unhideElementById(document, "logout-btn");
}
unhideElementById(document, "logout-btn");
}
else {
catch (_a) {
unhideElementById(document, "joinnow-btn");
unhideElementById(document, "signin-btn");
}