Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:zap: Refactored request in RSS widget (#632)

Alicia Sykes9eda0488426b
diff --git a/src/components/Widgets/RssFeed.vue b/src/components/Widgets/RssFeed.vue
index e00807dc..94f8398a 100644
--- a/src/components/Widgets/RssFeed.vue
+++ b/src/components/Widgets/RssFeed.vue
@@ -31,7 +31,6 @@
</template>
<script>
-import axios from 'axios';
import WidgetMixin from '@/mixins/WidgetMixin';
import { widgetApiEndpoints } from '@/utils/defaults';
@@ -91,16 +90,7 @@ export default {
methods: {
/* Make GET request to Rss2Json */
fetchData() {
- axios.get(this.endpoint)
- .then((response) => {
- this.processData(response.data);
- })
- .catch((error) => {
- this.error('Unable to RSS feed', error);
- })
- .finally(() => {
- this.finishLoading();
- });
+ this.makeRequest(this.endpoint).then(this.processData);
},
/* Assign data variables to the returned data */
processData(data) {