mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 16:10:07 +00:00
fix(journey): share the stays of a day report only with the recorded days, and hold the share read tests to the two new flags
This commit is contained in:
@@ -44,7 +44,8 @@ const WITHHELD = { status: 'withheld' } as const;
|
||||
* while the others still draw. Nothing is stored here and nothing is written:
|
||||
* a layer switched on in a browser only ever hides what the reader may see.
|
||||
* The public answer is cut on the server, by the link's flags, never by the
|
||||
* client: the map switched off shares nothing of it.
|
||||
* client: the map switched off shares nothing of it, and the stays, being
|
||||
* taken from a recording, travel only with the recorded days.
|
||||
*/
|
||||
@Injectable()
|
||||
export class JourneyMapService {
|
||||
@@ -91,7 +92,7 @@ export class JourneyMapService {
|
||||
const [places, routes, stays, recordings] = await Promise.all([
|
||||
sharePlan ? this.layer('places', journeyId, () => this.places(journeyId, published)) : WITHHELD,
|
||||
sharePlan && journey.show_trip_tracks ? this.layer('routes', journeyId, () => this.routes(journeyId)) : WITHHELD,
|
||||
this.layer('stays', journeyId, () => this.stays(journeyId, published)),
|
||||
link.share_recordings ? this.layer('stays', journeyId, () => this.stays(journeyId, published)) : WITHHELD,
|
||||
link.share_recordings
|
||||
? this.layer('recordings', journeyId, () => this.recordings(journeyId, published))
|
||||
: WITHHELD,
|
||||
|
||||
@@ -780,7 +780,7 @@ export class JourneyMcp {
|
||||
@Tool({
|
||||
name: 'create_journey_share_link',
|
||||
description:
|
||||
'Create or update the public share link for a journey. Owner only. Flags left out keep their current value on an existing link; a new link defaults to timeline/gallery/map on and plan/recordings off. share_plan puts the planned places and GPX tracks on the shared map, share_recordings the recorded days that have a published entry; neither shows anything while share_map is off.',
|
||||
'Create or update the public share link for a journey. Owner only. Flags left out keep their current value on an existing link; a new link defaults to timeline/gallery/map on and plan/recordings off. share_plan puts the planned places and GPX tracks on the shared map, share_recordings the recorded days that have a published entry and the stays of published entries; neither shows anything while share_map is off.',
|
||||
inputSchema: {
|
||||
journeyId: idSchema,
|
||||
share_timeline: z.boolean().optional(),
|
||||
|
||||
Reference in New Issue
Block a user