mirror of
https://github.com/immich-app/immich.git
synced 2025-04-14 12:06:25 +02:00
fix: queryBuilder
This commit is contained in:
parent
068d6b3f2f
commit
1a9a3a9537
1 changed files with 3 additions and 3 deletions
|
@ -335,17 +335,17 @@ export class AlbumRepository implements IAlbumRepository {
|
||||||
|
|
||||||
const albumSharedOptions = getAlbumSharedOptions();
|
const albumSharedOptions = getAlbumSharedOptions();
|
||||||
|
|
||||||
let queryBuilder = this.repository
|
const queryBuilder = this.repository
|
||||||
.createQueryBuilder('album')
|
.createQueryBuilder('album')
|
||||||
.leftJoinAndSelect('album.owner', 'owner')
|
.leftJoinAndSelect('album.owner', 'owner')
|
||||||
.leftJoinAndSelect('album.albumUsers', 'album_users')
|
.leftJoinAndSelect('album.albumUsers', 'album_users')
|
||||||
.leftJoinAndSelect('album_users.user', 'user');
|
.leftJoinAndSelect('album_users.user', 'user');
|
||||||
|
|
||||||
if (shared !== undefined) {
|
if (shared !== undefined) {
|
||||||
queryBuilder = queryBuilder.leftJoin('shared_links', 'shared_links', 'shared_links.albumId = album.id');
|
queryBuilder.leftJoin('shared_links', 'shared_links', 'shared_links.albumId = album.id');
|
||||||
}
|
}
|
||||||
|
|
||||||
queryBuilder = queryBuilder.where(
|
queryBuilder.where(
|
||||||
`${albumSharedOptions.owner} AND (LOWER(album.albumName) LIKE :nameStart OR LOWER(album.albumName) LIKE :nameAnywhere) ${albumSharedOptions.options}`,
|
`${albumSharedOptions.owner} AND (LOWER(album.albumName) LIKE :nameStart OR LOWER(album.albumName) LIKE :nameAnywhere) ${albumSharedOptions.options}`,
|
||||||
{
|
{
|
||||||
userId,
|
userId,
|
||||||
|
|
Loading…
Add table
Reference in a new issue