Skip to content

Commit

Permalink
Merge pull request #75 from varun-raj/santa-is-coming
Browse files Browse the repository at this point in the history
fix: album info and missing location fix
  • Loading branch information
varun-raj authored Dec 1, 2024
2 parents 0d194c9 + 835a7f9 commit c0c5897
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function MissingLocationAssets() {
),
},
],
})).filter((p) => !p.original);
}));
}, [assets, selectedIds]);

const slides = useMemo(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/api/albums/[id]/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function handler(
}
const { id } = req.query as { id: string };

const dbAlbums = await db.selectDistinctOn([assets.id], {
const dbAlbums = await db.selectDistinctOn([albums.id], {
id: albums.id,
albumName: albums.albumName,
createdAt: albums.createdAt,
Expand All @@ -35,7 +35,7 @@ export default async function handler(
.from(albums)
.leftJoin(albumsAssetsAssets, eq(albums.id, albumsAssetsAssets.albumsId))
.leftJoin(assets, eq(albumsAssetsAssets.assetsId, assets.id))
.leftJoin(exif, eq(assets.id, exif.assetId))
.leftJoin(exif, and(eq(assets.id, exif.assetId), eq(assets.isVisible, true)))
.leftJoin(assetFaces, eq(assets.id, assetFaces.assetId))
.leftJoin(person, and(eq(assetFaces.personId, person.id), eq(person.isHidden, false)))
.where(and(eq(albums.ownerId, currentUser.id), eq(albums.id, id)))
Expand Down
1 change: 0 additions & 1 deletion src/pages/api/assets/missing-location-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default async function handler(
gte(exif.dateTimeOriginal, startDateDate),
lte(exif.dateTimeOriginal, endDateDate),
eq(assets.ownerId, currentUser.id),
eq(assets.isVisible, true),
));

return res.status(200).json(rows);
Expand Down

0 comments on commit c0c5897

Please sign in to comment.