cs-prices: full ByMykel catalog, every config, daily multi-source prices, item pages with working charts
Deploy production / deploy (push) Successful in 1m18s
Deploy production / deploy (push) Successful in 1m18s
- cs.skins catalog (weapons, knives, gloves, stickers, cases, agents, charms, …) refreshed weekly - every market config: wears in float range, StatTrak, Souvenir, Doppler/Gamma phases - cs.daily_prices (one row per config/stream/day, idempotent) from Skinport, Steam, CSFloat, Buff163 - cs.price_windows for 24h/7d/30d/90d sale aggregates, cs.fx_rates (ECB) - scripts/cs-prices.ts daily|catalog|prices; legacy ingest fixed for the new unique index - skin browser + /projects/cs-prices/[slug] with variant/wear/phase switcher and real charts - charts show points for short histories and pad sparse time axes
This commit is contained in:
1 parent
9d79dfb43a
commit
9e89a615c6
16 files changed
+44371
-99
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { loadSeries, loadSkin, pickConfig, streams } from '#lib/server/cs-prices.js';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
// One skin (or sticker, case, agent, …) with every market config it has: wear, StatTrak,
|
||||
// Souvenir and Doppler phase. The selected config comes from ?v=&wear=&phase= so every config
|
||||
// has its own URL; its full daily history (EUR) is loaded here and the range is picked client-side.
|
||||
export const load: PageServerLoad = async ({ params, url }) => {
|
||||
const found = await loadSkin(params.slug);
|
||||
if (!found) error(404, 'Not Found');
|
||||
const config = pickConfig(found.configs, url.searchParams);
|
||||
const [streamList, history] = await Promise.all([
|
||||
streams(),
|
||||
config ? loadSeries(config, null) : Promise.resolve(null)
|
||||
]);
|
||||
return {
|
||||
skin: found.skin,
|
||||
configs: found.configs,
|
||||
selected: config?.id ?? null,
|
||||
streams: streamList,
|
||||
history
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user