⚡ Moves common functionality into reusable mixin
This commit is contained in:
@@ -49,11 +49,6 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/* Extends mixin, and updates data. Called by parent component */
|
||||
update() {
|
||||
this.startLoading();
|
||||
this.fetchData();
|
||||
},
|
||||
/* Makes GET request to the TFL API */
|
||||
fetchData() {
|
||||
axios.get(widgetApiEndpoints.tflStatus)
|
||||
@@ -114,10 +109,6 @@ export default {
|
||||
this.showAll = !this.showAll;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.options.showAll) this.showAll = true;
|
||||
this.fetchData();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user