Files
signal-platform/frontend/src/api/scores.ts
Dennis Thiessen 181cfe6588
Some checks failed
Deploy / lint (push) Failing after 8s
Deploy / test (push) Has been skipped
Deploy / deploy (push) Has been skipped
major update
2026-02-27 16:08:09 +01:00

19 lines
522 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);
}