Skip to content

Hide VIN and plate from public cars, fix timestamps and seed - #19

Merged
iligashi merged 1 commit into
mainfrom
fix/review-findings
Nov 14, 2026
Merged

iligashi merged 1 commit into
mainfrom
fix/review-findings

Conversation

@iligashi

Copy link
Copy Markdown
Owner

What

  1. Security: public GET /cars, /cars/featured and /cars/:slug no longer return vin or license_plate. The admin edit page now loads the car from a new GET /admin/cars/:id (admin auth), which also finds deactivated cars that the public list hides.
  2. Timestamps: mysql2 reads and writes DATETIME as UTC (timezone: 'Z'). Before, it used the Node process time zone, so on any machine not in UTC every timestamp shifted by the offset. Production already runs in UTC, so nothing changes there.
  3. Seed: the owner password comes from SEED_ADMIN_PASSWORD (12+ characters, required in production) or is generated and printed once. Before, every seeded database had the same known password. Locations and extras are skipped when one with the same name exists, so the seed is safe to rerun.
  4. Scripts: removes the root build:server script, which called a build script the server does not have.

Verified locally

  • npm test in server: 30 pass, 5 DB tests skipped locally (they run in CI).
  • Client tsc and ESLint on the edit page: clean.
  • Public /cars has no vin or license_plate. /admin/cars/:id returns them with an admin token, 404 for an unknown id, 401 without a token.
  • Ran the seed twice: row counts did not change.
  • The nexorarent-api parity tests pass against this branch with Express in a non-UTC time zone.

Notes

  • Existing duplicate locations and extras in a database are not removed. Reservations may reference them, so that needs a manual check per database.
  • Merge this before iligashi/nexorarent-api's matching PR: its parity job runs Express from main.

- Public /cars routes no longer return vin or license_plate. The admin edit
  page reads the new GET /admin/cars/:id, which also finds deactivated cars.
- mysql2 reads and writes DATETIME as UTC (timezone 'Z'), so timestamps no
  longer shift with the Node process time zone.
- The seed takes the owner password from SEED_ADMIN_PASSWORD or generates a
  random one, and no longer duplicates locations and extras on rerun.
- Remove the root build:server script; the server has no build step.
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nexorarent Ready Ready Preview Nov 14, 2026 1:51pm UTC
nexorarent-svi9 Ready Ready Preview Nov 14, 2026 1:51pm UTC
nexorarentacar Ready Ready Preview Nov 14, 2026 1:51pm UTC

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@iligashi
iligashi merged commit 5db9c73 into main Nov 14, 2026
10 checks passed

This branch was successfully deployed

3 active deployments
Preview – nexorarent-svi9 — 5ee68b82 Deployed Nov 14, 2026 by vercel[bot]
Preview – nexorarent — 5ee68b82 Deployed Nov 14, 2026 by vercel[bot]
Preview – nexorarentacar — 5ee68b82 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant