diff --git a/src/pages/albums/potential-albums.tsx b/src/pages/albums/potential-albums.tsx index e715b5a..509de92 100644 --- a/src/pages/albums/potential-albums.tsx +++ b/src/pages/albums/potential-albums.tsx @@ -66,10 +66,6 @@ export default function PotentialAlbums() { return createAlbum({ ...formData, assetIds: config.selectedIds, - albumUsers: [{ - role: "editor", - userId: id, - }] }).then(() => { toast({ title: "Album created", diff --git a/src/pages/api/albums/potential-albums-assets.ts b/src/pages/api/albums/potential-albums-assets.ts index fa725b2..c192505 100644 --- a/src/pages/api/albums/potential-albums-assets.ts +++ b/src/pages/api/albums/potential-albums-assets.ts @@ -39,6 +39,8 @@ const SELECT_ORPHAN_PHOTOS = (date: string, ownerId: string) => AND a."ownerId" = '${ownerId}' AND e."dateTimeOriginal"::date = '${date}' AND a."isVisible" = true + ORDER BY + e."dateTimeOriginal" DESC `); export default async function handler(