Refactored request in RSS widget (#632)

This commit is contained in:
Alicia Sykes 2022-05-15 20:46:19 +01:00
parent 2fe0110762
commit 9eda048842
1 changed files with 1 additions and 11 deletions

View File

@ -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) {