john-okeefe 964415198a fix(games): persist normalized Steam ID and guard scraper failures in create()
The store-URL support extracted the app ID into a local but never wrote
it back, so steamScraper still received the full URL, keyed the Steam API
response by the URL string, threw, and its caught Error object flowed into
Game.create() — surfacing as misleading 'Path lastModifiedBy / createdBy /
frontImage / title is required' validation errors.

- add utils/normalizeSteamId: digits pass through, /app/<id>/ (plus
  /agecheck/app/<id>/ and query strings) extracts the ID, empty -> '',
  anything else -> null (no .match()[0] / .includes crash on bad input)
- create(): 400 cleanly on unrecognized input, write the normalized ID
  back to req.body.steamId so dup checks, scraper, and stored doc agree
- guard the scrape result (missing title/frontImage, false, or Error) and
  400 'Steam lookup failed' instead of leaking it into Game.create
2026-09-06 10:11:07 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 19:32:09 -04:00
2024-09-12 19:32:45 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:44:28 -04:00
2024-09-12 15:48:27 -04:00
2024-09-12 15:44:28 -04:00
2024-09-12 15:48:27 -04:00

games-express-api

The games API written in ExpressJS

S
Description
The games API written in ExpressJS
Readme GPL-3.0
147 KiB
v1.2
Latest
2026-09-06 10:12:24 -04:00
Languages
JavaScript 94.2%
Makefile 2.9%
Dockerfile 2.2%
Shell 0.7%