mirror of
https://github.com/immich-app/immich.git
synced 2026-02-11 11:27:56 +03:00
minor renamery
This commit is contained in:
@@ -53,7 +53,7 @@ export class AlbumEntity {
|
||||
@Column({ comment: 'Asset ID to be used as thumbnail', nullable: true })
|
||||
albumThumbnailAssetId!: string | null;
|
||||
|
||||
@OneToMany(() => AlbumUserEntity, (permission) => permission.album)
|
||||
@OneToMany(() => AlbumUserEntity, ({ album }) => album)
|
||||
albumUsers!: AlbumUserEntity[];
|
||||
|
||||
@ManyToMany(() => AssetEntity, (asset) => asset.albums)
|
||||
|
||||
@@ -8,7 +8,7 @@ export type AlbumPermissionId = {
|
||||
};
|
||||
|
||||
export interface IAlbumUserRepository {
|
||||
create(albumPermission: Partial<AlbumUserEntity>): Promise<AlbumUserEntity>;
|
||||
create(albumUser: Partial<AlbumUserEntity>): Promise<AlbumUserEntity>;
|
||||
update({ userId, albumId }: AlbumPermissionId, albumPermission: Partial<AlbumUserEntity>): Promise<AlbumUserEntity>;
|
||||
delete({ userId, albumId }: AlbumPermissionId): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import { Repository } from 'typeorm';
|
||||
export class AlbumUserRepository implements IAlbumUserRepository {
|
||||
constructor(@InjectRepository(AlbumUserEntity) private repository: Repository<AlbumUserEntity>) {}
|
||||
|
||||
async create(dto: Partial<AlbumUserEntity>): Promise<AlbumUserEntity> {
|
||||
const { userId, albumId } = await this.repository.save(dto);
|
||||
async create(albumUser: Partial<AlbumUserEntity>): Promise<AlbumUserEntity> {
|
||||
const { userId, albumId } = await this.repository.save(albumUser);
|
||||
return this.repository.findOneOrFail({ where: { userId, albumId } });
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
dispatch('refreshAlbum');
|
||||
notificationController.show({ type: NotificationType.Info, message });
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to set permission');
|
||||
handleError(error, 'Unable to set user role');
|
||||
} finally {
|
||||
selectedRemoveUser = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user