mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
docs(server): plain wording in the comments and test titles this change added
Comments and test titles added on this branch cited review labels and planning documents that do not exist in the repository, and some used dashes as separators. They now say what the code does and why in plain sentences, and the Postgres lane's suites share one header format. Test ids stay as they were.
This commit is contained in:
@@ -50,7 +50,7 @@ import nodeHttp from 'node:http';
|
||||
* 4b. setupApiDocs — Swagger UI/spec at /api/docs* when TREK_API_DOCS_ENABLED.
|
||||
* 4c. the named body-parser wrappers — the global 100kb JSON/urlencoded
|
||||
* parsers, exempting /mcp so the MCP SDK reads the raw stream.
|
||||
* 4d. nulFreeRequest — drops NUL from the path, query, body and cookies.
|
||||
* 4d. nulFreeRequest, which drops NUL from the path, query, body and cookies.
|
||||
* 5. app.init() — every domain controller, including the transport surface
|
||||
* that used to live pre-init: /api/health (FeaturesController), OAuth
|
||||
* discovery documents (DiscoveryController), the /oauth/consent COOP
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface ReservationTraveler {
|
||||
is_guest?: number | null;
|
||||
}
|
||||
|
||||
/** A reservation row as the joined list/get queries return it (open record —
|
||||
/** A reservation row as the joined list/get queries return it (an open record:
|
||||
* the legacy queries selected `r.*` and callers pass the row through; the
|
||||
* named fields are the columns consumers read in a typed position). */
|
||||
export type ReservationRow = Record<string, unknown> & {
|
||||
|
||||
@@ -613,7 +613,7 @@ export class ReservationsService {
|
||||
// the two together would bend one of them out of shape. The day stop is the
|
||||
// part that must not exist twice, so it comes from AccommodationsService.
|
||||
// The payload's accommodation_id is untrusted input and goes through
|
||||
// `toRowId` the way update() reads it (L2): a `'0x1'` or an `'abc'` used to
|
||||
// `toRowId` the way update() reads it: a `'0x1'` or an `'abc'` used to
|
||||
// be stored as `'0x1.0'`, which Postgres cannot cast back for the join.
|
||||
let resolvedAccommodationId: number | null = toRowId(accommodation_id) || null;
|
||||
if (type === 'hotel' && !resolvedAccommodationId && create_accommodation) {
|
||||
|
||||
Reference in New Issue
Block a user