Skip to content

Instantly share code, notes, and snippets.

View madsh93's full-sized avatar

Mads Hjorth madsh93

View GitHub Profile
<script>
export default {
async fetch() {
const response = await fetch('https://beyond-apis.glitch.me/launch/api/v2/all').then((res) =>
res.json()
)
const data = response[0].results.find((obj) => obj.slug === this.$route.params.slug)
// If data is null or undefined, return 404
if (data == null) {