From 8c20d8cb3d74356846d4f3c6f5b7eb8c019d65b8 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 Feb 2023 17:15:32 -0600 Subject: [PATCH] fix(server): Create album response doesn't have owner property as required (#1704) --- server/apps/immich/src/api-v1/album/album-repository.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/apps/immich/src/api-v1/album/album-repository.ts b/server/apps/immich/src/api-v1/album/album-repository.ts index 81f72db18..38a2b4406 100644 --- a/server/apps/immich/src/api-v1/album/album-repository.ts +++ b/server/apps/immich/src/api-v1/album/album-repository.ts @@ -84,7 +84,11 @@ export class AlbumRepository implements IAlbumRepository { newAlbum.ownerId = ownerId; newAlbum.albumName = createAlbumDto.albumName; - const album = await transactionalEntityManager.save(newAlbum); + let album = await transactionalEntityManager.save(newAlbum); + album = await transactionalEntityManager.findOneOrFail(AlbumEntity, { + where: { id: album.id }, + relations: ['owner'], + }); // Add shared users if (createAlbumDto.sharedWithUserIds?.length) {