phase-10.5: market screener ui enhancements

This commit is contained in:
Kazuma
2026-06-09 01:21:02 -04:00
parent 7bc242911e
commit fbadd7fb6e
45 changed files with 3054 additions and 539 deletions
+3 -3
View File
@@ -1,4 +1,5 @@
import type { MarketCall, CalendarEvent, ScreenerResult } from '$lib/types.js';
import { authFetch } from './auth.js';
const BASE = '/api';
@@ -21,9 +22,8 @@ export async function createCall(payload: {
tickers: string[];
date?: string;
}): Promise<MarketCall> {
const res = await fetch(`${BASE}/calls`, {
const res = await authFetch(`${BASE}/calls`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
if (!res.ok) throw new Error(await res.text());
@@ -31,7 +31,7 @@ export async function createCall(payload: {
}
export async function deleteCall(id: string): Promise<{ ok: boolean }> {
const res = await fetch(`${BASE}/calls/${id}`, { method: 'DELETE' });
const res = await authFetch(`${BASE}/calls/${id}`, { method: 'DELETE' });
if (!res.ok) throw new Error(await res.text());
return res.json();
}