Files
signal-platform/frontend/src/api/watchlist.ts
T
Dennis Thiessen 61ab24490d
Deploy / lint (push) Failing after 7s
Deploy / test (push) Has been skipped
Deploy / deploy (push) Has been skipped
first commit
2026-02-20 17:31:01 +01:00

19 lines
469 B
TypeScript

import apiClient from './client';
import type { WatchlistEntry } from '../lib/types';
export function list() {
return apiClient.get<WatchlistEntry[]>('watchlist').then((r) => r.data);
}
export function add(symbol: string) {
return apiClient
.post<WatchlistEntry>(`watchlist/${symbol}`)
.then((r) => r.data);
}
export function remove(symbol: string) {
return apiClient
.delete<{ message: string }>(`watchlist/${symbol}`)
.then((r) => r.data);
}