Skip to content

Commit

Permalink
Fetch data on mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
AchoArnold committed Dec 3, 2024
1 parent ea26d68 commit be58689
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions web/pages/oss-friends/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,20 @@ export default Vue.extend({
mdiOpenInNew,
apps: [] as AppData[],
}),
async fetch() {
const response = await fetch(
'https://corsproxy.io/?https%3A%2F%2Fformbricks.com%2Fapi%2Foss-friends',
).then((res) => res.json())
this.apps = response.data
},
head() {
return {
title: 'Open Source Friends - httpSMS',
}
},
mounted() {
fetch(
'https://corsproxy.io/?https%3A%2F%2Fformbricks.com%2Fapi%2Foss-friends',
)
.then((res) => res.json())
.then((response: any) => {
this.apps = response.data
})
},
})
</script>

Expand Down

0 comments on commit be58689

Please sign in to comment.