mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 00:43:15 +00:00
feat(journey): complete sharing, photo drafts and Studio maps
Connect the Journey backend to the web and mobile UI, including public access and subscriptions, day recordings, photo drafts and per-map framing. Preserve legacy recording responses and cover the new behavior in every locale.
This commit is contained in:
@@ -1047,12 +1047,6 @@ export const journeyApi = {
|
||||
createShareLink: (id: number, perms: JourneyShareLinkRequest) => apiClient.post(`/journeys/${id}/share-link`, perms).then(r => r.data),
|
||||
deleteShareLink: (id: number) => apiClient.delete(`/journeys/${id}/share-link`).then(r => r.data),
|
||||
getPublicJourney: (token: string) => apiClient.get(`/public/journey/${token}`).then(r => r.data),
|
||||
/**
|
||||
* A reader's password for a protected link (#2553). The answer sets the link's
|
||||
* unlock cookie, which every later read and photo of that link sends along.
|
||||
*/
|
||||
unlockPublicJourney: (token: string, password: string): Promise<{ success: true }> =>
|
||||
apiClient.post(`/public/journey/${token}/unlock`, { password }).then(r => r.data),
|
||||
}
|
||||
|
||||
// Photo providers (Immich, Synology Photos, …) behind /api/integrations/memories.
|
||||
|
||||
@@ -28,7 +28,7 @@ const upstream = { timeout: DAWARICH_UPSTREAM_TIMEOUT_MS };
|
||||
*/
|
||||
export const journeyRecordingsApi = {
|
||||
list: (journeyId: number, signal?: AbortSignal): Promise<JourneyRecordedDaysResponse> =>
|
||||
apiClient.get(base(journeyId), { signal }).then((r) => r.data),
|
||||
apiClient.get(base(journeyId), { signal, params: { includeGpx: true } }).then((r) => r.data),
|
||||
prep: (journeyId: number, signal?: AbortSignal): Promise<JourneyRecordingPrep> =>
|
||||
apiClient.get(`${base(journeyId)}/prep`, { signal }).then((r) => r.data),
|
||||
preview: (
|
||||
|
||||
@@ -34,6 +34,10 @@ export const journeySocialApi = {
|
||||
|
||||
publicComments: (token: string, signal?: AbortSignal): Promise<JourneyPublicCommentsResponse> =>
|
||||
apiClient.get(`${pub(token)}/comments`, { signal }).then((r) => r.data),
|
||||
recordPublicView: (token: string): Promise<{ success: true }> =>
|
||||
apiClient.post(`${pub(token)}/view`).then((r) => r.data),
|
||||
unlockPublicJourney: (token: string, password: string): Promise<{ success: true }> =>
|
||||
apiClient.post(`${pub(token)}/unlock`, { password }).then((r) => r.data),
|
||||
addPublicComment: (
|
||||
token: string,
|
||||
entryId: number,
|
||||
|
||||
Reference in New Issue
Block a user