From e5f15c537b5f4322fd79c43e75726eaf9fb07568 Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Mon, 29 Apr 2024 03:50:32 +0200 Subject: [PATCH] attempt fix cors on get reqs --- assets/js/extending.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/js/extending.js b/assets/js/extending.js index adde99e6..526cefa6 100644 --- a/assets/js/extending.js +++ b/assets/js/extending.js @@ -99,6 +99,7 @@ const loadDiocesanCalendarData = () => { url: RegionalDataURL, method: 'GET', dataType: 'json', + crossDomain: true, data: { "key" : dioceseKey, "category": "diocesanCalendar" }, statusCode: { 404: (xhr, textStatus, errorThrown) => { @@ -753,6 +754,7 @@ $(document).on('change', '.regionalNationalCalendarName', ev => { url: RegionalDataURL, method: 'GET', dataType: 'json', + crossDomain: true, data: { "key" : key, "category": category, "locale": LOCALE }, statusCode: { 404: (xhr, textStatus, errorThrown) => { @@ -961,7 +963,7 @@ $(document).on('click', '#deleteDiocesanCalendarButton', ev => { let deleteKey = { LitCal: $key, Diocese: $diocese, Nation: $nation, category: 'diocesanCalendar' }; $.ajax({ url: RegionalDataURL, - method: 'delete', + method: 'DELETE', dataType: 'json', contentType: 'application/json', crossDomain: false, @@ -1107,7 +1109,7 @@ $(document).on('click', '.serializeRegionalNationalData', ev => { //console.log(JSON.stringify(finalObj)); $.ajax({ url: RegionalDataURL, - method: 'put', + method: 'PUT', dataType: 'json', contentType: 'application/json', crossDomain: false,