3 Commits
Author SHA1 Message Date
john-okeefe 748616df9d feat(games): accept full Steam store URL in create()
Allow callers to pass either a raw Steam app ID or a full store URL (e.g. https://store.steampowered.com/app/730/...) in req.body.steamId.

In create() in controllers/games.js:

- normalize input into a local steamId variable: if the value includes store.steampowered.com, extract the numeric ID via match(/\d+/)[0], otherwise use the value as-is

- use the normalized steamId for both duplicate checks: user-scoped lookup (steamId + accessedBy.user) and global lookup

This lets users paste a copied store link directly without manually stripping the app ID, while keeping existing raw-ID behavior unchanged.
2026-09-05 19:16:14 -04:00
john-okeefe a9b9fe1047 style(games): reformat controllers/games.js with Prettier
Apply Prettier default formatting across the games controller with no logic changes:

- single -> double quotes, add missing semicolons

- 2-space indentation and consistent line wrapping

- expand dense ternary/decode blocks in create() and update() for readability

This isolates the upcoming create() Steam URL feature so its functional diff stays small and reviewable.
2026-09-05 19:16:06 -04:00
john-okeefe d575a4efc5 moved api from monorepo 2024-09-12 15:48:27 -04:00