1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00

fix(server): Create album response doesn't have owner property as required (#1704)

This commit is contained in:
Alex 2023-02-08 17:15:32 -06:00 committed by GitHub
parent 43359f1d26
commit 8c20d8cb3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {