diff --git a/app/javascript/controllers/trips_controller.js b/app/javascript/controllers/trips_controller.js index 00a2b497..497fe5e3 100644 --- a/app/javascript/controllers/trips_controller.js +++ b/app/javascript/controllers/trips_controller.js @@ -80,10 +80,10 @@ export default class extends Controller { this.map.on('overlayadd', (e) => { if (e.name !== 'Photos') return; - if (!this.userSettings.immich_url || !this.userSettings.immich_api_key) { + if ((!this.userSettings.immich_url || !this.userSettings.immich_api_key) && (!this.userSettings.photoprism_url || !this.userSettings.photoprism_api_key)) { showFlashMessage( 'error', - 'Immich integration is not configured. Please check your settings.' + 'Photos integration is not configured. Please check your integrations settings.' ); return; } diff --git a/app/javascript/maps/helpers.js b/app/javascript/maps/helpers.js index 446122a8..7fdcdbca 100644 --- a/app/javascript/maps/helpers.js +++ b/app/javascript/maps/helpers.js @@ -159,7 +159,7 @@ export async function fetchAndDisplayPhotos({ map, photoMarkers, apiKey, startDa start_date: startDate, end_date: endDate }); - console.log(startDate, endDate); + const response = await fetch(`/api/v1/photos?${params}`); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}, response: ${response.body}`);