mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor: create album (#2555)
This commit is contained in:
@@ -123,8 +123,12 @@ export class AlbumRepository implements IAlbumRepository {
|
||||
});
|
||||
}
|
||||
|
||||
create(album: Partial<AlbumEntity>): Promise<AlbumEntity> {
|
||||
return this.save(album);
|
||||
}
|
||||
|
||||
async save(album: Partial<AlbumEntity>) {
|
||||
const { id } = await this.repository.save(album);
|
||||
return this.repository.findOneOrFail({ where: { id } });
|
||||
return this.repository.findOneOrFail({ where: { id }, relations: { owner: true } });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user