mirror of
https://github.com/immich-app/immich.git
synced 2025-03-25 02:41:37 -05: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();
|
||||
|
||||
let queryBuilder = this.repository
|
||||
const queryBuilder = this.repository
|
||||
.createQueryBuilder('album')
|
||||
.leftJoinAndSelect('album.owner', 'owner')
|
||||
.leftJoinAndSelect('album.albumUsers', 'album_users')
|
||||
.leftJoinAndSelect('album_users.user', 'user');
|
||||
|
||||
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}`,
|
||||
{
|
||||
userId,
|
||||
|
|
Loading…
Add table
Reference in a new issue