feat(library): sync the Steam wishlist with store prices

Each sync fetches the public wishlist and the store name, price and discount
(batches of 100) and replaces the user's wishlist_game rows, without games
the user owns. A Steam error keeps the old list, a failed store batch keeps
the last known price, and a Steam ID change drops the old account's list.
GET /api/library/wishlist returns it newest first.
This commit is contained in:
lobo committed 2026-09-24 13:58:44 +02:00
1 parent ba1f1e6fe1
commit ea1e1e9aec
15 files changed
+604

No files matched your search

@@ -0,0 +1,12 @@
-- The user's Steam wishlist without the games already owned. The sync replaces it as a whole.
-- Name and price come from the Steam store at sync time.
CREATE TABLE wishlist_game (
user_id BIGINT NOT NULL,
appid BIGINT NOT NULL,
name VARCHAR(512),
added_at TIMESTAMPTZ,
price VARCHAR(32),
original_price VARCHAR(32),
discount_pct INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (user_id, appid)
);