mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 16:10:07 +00:00
refactor(server): keep the fixes within the size and strict ratchets
The admin settings audit summary moves to auth.helpers, the booking stay check to DayAccommodationsRepository.idOnTrip, the strict typings declare the MCP SDK types module, and the useAdmin test leaves the format baseline.
This commit is contained in:
@@ -145,6 +145,11 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
return !!row;
|
||||
}
|
||||
|
||||
/** `id` while that stay is on the trip, else null: what a booking may link to. */
|
||||
async idOnTrip(id: number | null, trip_id: number): Promise<number | null> {
|
||||
return id && (await this.existsInTrip(id, trip_id)) ? id : null;
|
||||
}
|
||||
|
||||
/** RS38 — `SELECT check_in FROM day_accommodations WHERE id = ?`. */
|
||||
async getCheckIn(id: number): Promise<string | null | undefined> {
|
||||
const row = await this.qb('a')
|
||||
|
||||
Reference in New Issue
Block a user