Lib: Add schema + fetcher for seasonpickpoints table
This commit is contained in:
@ -18,6 +18,7 @@ import type {
|
|||||||
ScrapedTeamStanding,
|
ScrapedTeamStanding,
|
||||||
SeasonPick,
|
SeasonPick,
|
||||||
SeasonPickedUser,
|
SeasonPickedUser,
|
||||||
|
SeasonPickPoints,
|
||||||
SeasonPickResult,
|
SeasonPickResult,
|
||||||
Substitution,
|
Substitution,
|
||||||
Team,
|
Team,
|
||||||
@ -323,6 +324,19 @@ export const fetch_racepickpointstotal = async (
|
|||||||
return racepickpointstotal;
|
return racepickpointstotal;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch all [SeasonPickPoints] from the database.
|
||||||
|
*/
|
||||||
|
export const fetch_seasonpickpoints = async (
|
||||||
|
fetch: (_: any) => Promise<Response>,
|
||||||
|
): Promise<SeasonPickPoints[]> => {
|
||||||
|
const seasonpickpoints: SeasonPickPoints[] = await pb
|
||||||
|
.collection("seasonpickpoints")
|
||||||
|
.getFullList({ fetch: fetch });
|
||||||
|
|
||||||
|
return seasonpickpoints;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch all [ScrapedDriverStandings] from the database, ordered ascendingly by position.
|
* Fetch all [ScrapedDriverStandings] from the database, ordered ascendingly by position.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -169,6 +169,19 @@ export interface RacePickPointsTotal {
|
|||||||
total_points_per_pick: number;
|
total_points_per_pick: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SeasonPickPoints {
|
||||||
|
id: string;
|
||||||
|
user: string;
|
||||||
|
hottake_points: number;
|
||||||
|
wdc_points: number;
|
||||||
|
wcc_points: number;
|
||||||
|
doohan_points: number;
|
||||||
|
overtakes_points: number;
|
||||||
|
dnfs_points: number;
|
||||||
|
teamwinner_points: number;
|
||||||
|
podium_points: number;
|
||||||
|
}
|
||||||
|
|
||||||
// Scraped Data
|
// Scraped Data
|
||||||
|
|
||||||
export interface ScrapedStartingGrid {
|
export interface ScrapedStartingGrid {
|
||||||
|
|||||||
Reference in New Issue
Block a user