From 4988e7387d542f362f0eabc3ed7f0010352242a4 Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Fri, 8 Mar 2024 10:00:24 -0500 Subject: [PATCH] gets next election day from new api https://admin-vote.phila.gov/wp-json/votes/v1/election --- src/data-sources/election-next.js | 3 ++- src/topics/voting.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/data-sources/election-next.js b/src/data-sources/election-next.js index cfca5a83..24e32aa9 100644 --- a/src/data-sources/election-next.js +++ b/src/data-sources/election-next.js @@ -1,7 +1,8 @@ export default { id: 'nextElectionAPI', type: 'http-get', - url: 'https://apis.philadelphiavotes.com/election', + // url: 'https://apis.philadelphiavotes.com/election', + url: 'https://admin-vote.phila.gov/wp-json/votes/v1/election', options: { }, success: function(data) { diff --git a/src/topics/voting.js b/src/topics/voting.js index 579cd1c6..32229478 100644 --- a/src/topics/voting.js +++ b/src/topics/voting.js @@ -44,7 +44,7 @@ export default { titleBackground: '#2176d2', value: function(state) { // return 'voting.topic.badge1.content'; - return format(parseISO(state.sources.nextElectionAPI.data.election_date), 'MMMM d, yyyy'); + return format(parseISO(state.sources.nextElectionAPI.data.election_count_down_settings.election_day), 'MMMM d, yyyy'); }, }, // end slots }, // end of badge