Skip to content

Commit 9eda048

Browse files
committed
⚡ Refactored request in RSS widget (#632)
1 parent 2fe0110 commit 9eda048

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/components/Widgets/RssFeed.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
</template>
3232

3333
<script>
34-
import axios from 'axios';
3534
import WidgetMixin from '@/mixins/WidgetMixin';
3635
import { widgetApiEndpoints } from '@/utils/defaults';
3736
@@ -91,16 +90,7 @@ export default {
9190
methods: {
9291
/* Make GET request to Rss2Json */
9392
fetchData() {
94-
axios.get(this.endpoint)
95-
.then((response) => {
96-
this.processData(response.data);
97-
})
98-
.catch((error) => {
99-
this.error('Unable to RSS feed', error);
100-
})
101-
.finally(() => {
102-
this.finishLoading();
103-
});
93+
this.makeRequest(this.endpoint).then(this.processData);
10494
},
10595
/* Assign data variables to the returned data */
10696
processData(data) {

0 commit comments

Comments
 (0)