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
+4 -2
View File
@@ -5,10 +5,12 @@ import { apiBase } from '@/stores/url';
export async function obtenerSeguidoresPorUsuario(
id: string,
limit: number = 20
limit: number = 20,
fetch2: Function
): Promise<UsersResponseDto | null> {
try {
const response = await fetch(`${get(apiBase)}/api/users/${id}/followers?limit=${limit}`, {
const fetchFunc = fetch2 || fetch;
const response = await fetchFunc(`${get(apiBase)}/api/users/${id}/followers?limit=${limit}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',