Files
signal-platform/frontend/src/api/scores.ts
Dennis Thiessen 61ab24490d
Some checks failed
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
518 B
TypeScript

import apiClient from './client';
import type { ScoreResponse, RankingsResponse } from '../lib/types';
export function getScores(symbol: string) {
return apiClient
.get<ScoreResponse>(`scores/${symbol}`)
.then((r) => r.data);
}
export function getRankings() {
return apiClient.get<RankingsResponse>('rankings').then((r) => r.data);
}
export function updateWeights(weights: Record<string, number>) {
return apiClient
.put<{ message: string }>('scores/weights', weights)
.then((r) => r.data);
}