Skip to content

Commit

Permalink
⚡ Refactored request in RSS widget (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed May 15, 2022
1 parent 2fe0110 commit 9eda048
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/components/Widgets/RssFeed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
</template>

<script>
import axios from 'axios';
import WidgetMixin from '@/mixins/WidgetMixin';
import { widgetApiEndpoints } from '@/utils/defaults';
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 9eda048

Please sign in to comment.