fix: correct join condition for album assets in photo statistics
This commit is contained in:
1 parent
a9bcd694a0
commit
b0607f310e
1 file changed
+1
-1
@@ -17,7 +17,7 @@ export default async function handler(
|
||||
value: count(sql`DISTINCT ${assets.id}`),
|
||||
})
|
||||
.from(assets)
|
||||
.innerJoin(albumsAssetsAssets, eq(assets.id, albumsAssetsAssets.assetsId))
|
||||
.innerJoin(albumsAssetsAssets, eq(assets.id, albumsAssetsAssets.assetId))
|
||||
.where(eq(assets.ownerId, currentUser.id));
|
||||
|
||||
// Count total photos
|
||||
|
||||
Reference in new issue
Block a user