bun run format

This commit is contained in:
2026-01-27 19:43:32 -03:00
parent 37f1b46306
commit e1864660a7
19 changed files with 115 additions and 121 deletions

View File

@@ -1,6 +1,6 @@
import { apiBase } from "@/stores/url";
import { sesionStore } from "@/stores/usuario";
import { get } from "svelte/store";
import { apiBase } from '@/stores/url';
import { sesionStore } from '@/stores/usuario';
import { get } from 'svelte/store';
import type { Post } from '../../types';
import { PAGE_SIZE } from '../stores/posts';
@@ -10,12 +10,11 @@ export async function getPosts(page: number = 1): Promise<Post[]> {
const headers: HeadersInit = {};
if (token) headers.Authorization = `Bearer ${token}`;
const res = await fetch(
`${get(apiBase)}/timeline?page=${page}&pageSize=${PAGE_SIZE}`,
{ headers }
);
const res = await fetch(`${get(apiBase)}/timeline?page=${page}&pageSize=${PAGE_SIZE}`, {
headers
});
if (!res.ok) throw new Error('Error cargando posts');
return res.json();
}
}