Repository navigation
Hide VIN and plate from public cars, fix timestamps and seed - #19
Merged
Merged
Conversation
- 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GET /cars,/cars/featuredand/cars/:slugno longer returnvinorlicense_plate. The admin edit page now loads the car from a newGET /admin/cars/:id(admin auth), which also finds deactivated cars that the public list hides.DATETIMEas 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.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.build:serverscript, which called abuildscript the server does not have.Verified locally
npm testin server: 30 pass, 5 DB tests skipped locally (they run in CI).tscand ESLint on the edit page: clean./carshas novinorlicense_plate./admin/cars/:idreturns them with an admin token, 404 for an unknown id, 401 without a token.Notes
main.