Skip to content

Commit be58689

Browse files
committed
Fetch data on mounted
1 parent ea26d68 commit be58689

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

web/pages/oss-friends/index.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,20 @@ export default Vue.extend({
6363
mdiOpenInNew,
6464
apps: [] as AppData[],
6565
}),
66-
async fetch() {
67-
const response = await fetch(
68-
'https://corsproxy.io/?https%3A%2F%2Fformbricks.com%2Fapi%2Foss-friends',
69-
).then((res) => res.json())
70-
this.apps = response.data
71-
},
7266
head() {
7367
return {
7468
title: 'Open Source Friends - httpSMS',
7569
}
7670
},
71+
mounted() {
72+
fetch(
73+
'https://corsproxy.io/?https%3A%2F%2Fformbricks.com%2Fapi%2Foss-friends',
74+
)
75+
.then((res) => res.json())
76+
.then((response: any) => {
77+
this.apps = response.data
78+
})
79+
},
7780
})
7881
</script>
7982

0 commit comments

Comments
 (0)