algunos refactor y ahora arregle lo que no se actualizaba la tarjeta de

perfil
This commit is contained in:
2025-12-26 01:37:10 -03:00
parent 6d2bb774d4
commit 9508b575f5
6 changed files with 91 additions and 90 deletions
+5 -2
View File
@@ -5,10 +5,13 @@ import { get } from 'svelte/store';
export async function obtenerSeguidosPorUsuario(
id: string,
limit: number = 20
limit: number = 20,
fetch2?: Function
): Promise<UsersResponseDto | null> {
try {
const response = await fetch(`${get(apiBase)}/api/users/${id}/following?limit=${limit}`, {
const fetchFunc = fetch2 || fetch;
const response = await fetchFunc(`${get(apiBase)}/api/users/${id}/following?limit=${limit}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',