first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user