From 1ff44639fb150203f2b87100063a9b60236b1a2a Mon Sep 17 00:00:00 2001 From: Apoorva Ganapathy <161405340+apganapa-adobe@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:38:01 -0600 Subject: [PATCH] Revert "Update Event to ESL (#225)" (#226) This reverts commit f216bfb5509482d9d203abdef0a32d96cc75b3f0. --- ecc/scripts/esp-controller.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ecc/scripts/esp-controller.js b/ecc/scripts/esp-controller.js index cc5816e1..c6db76b7 100644 --- a/ecc/scripts/esp-controller.js +++ b/ecc/scripts/esp-controller.js @@ -531,7 +531,7 @@ export async function updateSpeaker(profile, seriesId) { } export async function updateEvent(eventId, payload) { - const { host } = getAPIConfig().esl[ECC_ENV]; + const { host } = getAPIConfig().esp[ECC_ENV]; const raw = JSON.stringify({ ...payload, liveUpdate: false }); const options = await constructRequestOptions('PUT', raw); @@ -544,7 +544,7 @@ export async function updateEvent(eventId, payload) { return { ok: response.ok, status: response.status, error: data }; } - return data.espProvider || data; + return data; } catch (error) { window.lana?.log(`Failed to update event ${eventId}. Error:`, error); return { ok: false, status: 'Network Error', error: error.message }; @@ -552,7 +552,7 @@ export async function updateEvent(eventId, payload) { } export async function publishEvent(eventId, payload) { - const { host } = getAPIConfig().esl[ECC_ENV]; + const { host } = getAPIConfig().esp[ECC_ENV]; const raw = JSON.stringify({ ...payload, published: true, liveUpdate: true }); const options = await constructRequestOptions('PUT', raw); @@ -565,7 +565,7 @@ export async function publishEvent(eventId, payload) { return { ok: response.ok, status: response.status, error: data }; } - return data.espProvider || data; + return data; } catch (error) { window.lana?.log(`Failed to publish event ${eventId}. Error:`, error); return { ok: false, status: 'Network Error', error: error.message }; @@ -573,7 +573,7 @@ export async function publishEvent(eventId, payload) { } export async function unpublishEvent(eventId, payload) { - const { host } = getAPIConfig().esl[ECC_ENV]; + const { host } = getAPIConfig().esp[ECC_ENV]; const raw = JSON.stringify({ ...payload, published: false, liveUpdate: true }); const options = await constructRequestOptions('PUT', raw); @@ -586,7 +586,7 @@ export async function unpublishEvent(eventId, payload) { return { ok: response.ok, status: response.status, error: data }; } - return data.espProvider || data; + return data; } catch (error) { window.lana?.log(`Failed to unpublish event ${eventId}. Error:`, error); return { ok: false, status: 'Network Error', error: error.message };