fix(library): Use $dropFetch util

This commit is contained in:
Aden Lindsay
2025-03-15 09:54:20 +10:30
committed by GitHub
parent 19d1a9dd0e
commit c052511ff3

View File

@ -169,12 +169,12 @@ import type { Game } from "@prisma/client";
const route = useRoute(); const route = useRoute();
const id = route.params.id.toString(); const id = route.params.id.toString();
const { data: rawGame } = await useFetch<Game>(`/api/v1/games/${id}`); const rawGame = await $dropFetch<Game>(`/api/v1/games/${id}`);
const game = computed(() => { const game = computed(() => {
if (!rawGame.value) { if (!rawGame) {
throw createError({ statusCode: 404, message: 'Game not found' }); throw createError({ statusCode: 404, message: 'Game not found' });
} }
return rawGame.value; return rawGame;
}); });
// Convert markdown to HTML // Convert markdown to HTML