Consider both Immich and Photoprism integrations in trips controller

This commit is contained in:
Eugene Burmakin 2024-12-03 15:12:20 +01:00
parent 83078c5b29
commit 42b74ecd52
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}

View file

@ -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}`);