Fix immich version check

pull/3826/head
shamoon 3 months ago
parent 1c5d9ca223
commit b9b7c482d4

@ -10,7 +10,8 @@ export default function Component({ service }) {
const { data: versionData, error: versionError } = useWidgetAPI(widget, "version");
// see https://github.com/gethomepage/homepage/issues/2282
const endpoint = versionData?.major >= 1 && versionData?.minor > 84 ? "statistics" : "stats";
const endpoint =
versionData?.major > 1 || (versionData?.major === 1 && versionData?.minor > 84) ? "statistics" : "stats";
const { data: immichData, error: immichError } = useWidgetAPI(widget, endpoint);
if (immichError || versionError || immichData?.statusCode === 401) {

Loading…
Cancel
Save