fix: no se usaba el fetch del framework

This commit is contained in:
2025-12-29 20:46:35 -03:00
parent bce2c6b949
commit e21d06e898
2 changed files with 5 additions and 4 deletions

View File

@@ -1,10 +1,10 @@
import { obtenerCantidadDeUsosdeHtag } from '@/hooks/obtenerCantidadDeUsosdeHtag.js';
import { error } from '@sveltejs/kit';
export async function load({ params }) {
export async function load({ params, fetch }) {
let { htag } = params;
const posts = await obtenerCantidadDeUsosdeHtag(htag);
const posts = await obtenerCantidadDeUsosdeHtag(htag, fetch);
// if (cantidad == null || posts.lenght == 0) return error(404, 'no existe el #(hashtag)');
return { htag, posts };
}