From bbb0f16ead11c57e76b3c9730e32f40e0934b30e Mon Sep 17 00:00:00 2001 From: k073l <21180271+k073l@users.noreply.github.com> Date: Tue, 21 Jun 2022 13:02:26 +0200 Subject: [PATCH 1/2] Change APOD API endpoint --- src/utils/defaults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/defaults.js b/src/utils/defaults.js index e1b411288f..128a3572e6 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -217,7 +217,7 @@ module.exports = { /* API endpoints for widgets that need to fetch external data */ widgetApiEndpoints: { anonAddy: 'https://app.anonaddy.com', - astronomyPictureOfTheDay: 'https://apodapi.herokuapp.com/api', + astronomyPictureOfTheDay: 'https://go-apod.herokuapp.com/apod', blacklistCheck: 'https://api.blacklistchecker.com/check', codeStats: 'https://codestats.net/', covidStats: 'https://disease.sh/v3/covid-19', From 45900da025aadf59364ecfc01cc136d94da5279d Mon Sep 17 00:00:00 2001 From: k073l <21180271+k073l@users.noreply.github.com> Date: Tue, 21 Jun 2022 13:57:33 +0200 Subject: [PATCH 2/2] :lipstick: Update Apod.vue to new API --- src/components/Widgets/Apod.vue | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/Widgets/Apod.vue b/src/components/Widgets/Apod.vue index 2d53c39e4f..cbf68189e2 100644 --- a/src/components/Widgets/Apod.vue +++ b/src/components/Widgets/Apod.vue @@ -1,15 +1,15 @@ @@ -24,17 +24,17 @@ export default { data() { return { title: null, - image: null, - hdImage: null, - link: null, - description: null, + url: null, + hdurl: null, + link: 'https://apod.nasa.gov/apod/astropix.html', + explanation: null, copyright: null, - showFullDesc: false, + showFullExp: false, }; }, computed: { - truncatedDescription() { - return this.showFullDesc ? this.description : `${this.description.substring(0, 100)}...`; + truncatedExplanation() { + return this.showFullExp ? this.explanation : `${this.explanation.substring(0, 100)}...`; }, }, methods: { @@ -52,14 +52,14 @@ export default { }, processData(data) { this.title = data.title; - this.image = data.url; - this.hdImage = data.hdurl; - this.link = data.apod_site; - this.description = data.description; + this.url = data.url; + this.hdurl = data.hdurl; + this.link = data.link; + this.explanation = data.explanation; this.copyright = data.copyright; }, toggleShowFull() { - this.showFullDesc = !this.showFullDesc; + this.showFullExp = !this.showFullExp; }, }, }; @@ -85,7 +85,7 @@ export default { opacity: var(--dimming-factor); color: var(--widget-text-color); } - p.description { + p.explanation { color: var(--widget-text-color); font-size: 1rem; margin: 0.5rem 0;