mirror of
https://github.com/immich-app/immich.git
synced 2026-03-26 11:50:53 +03:00
chore: remove all deprecated endpoints/properties from server and mobile app (#9724)
* chore: remove deprecated title property from MemoryLaneResponseDto * chore: remove deprecated webpPath and resizePath from MetadataSearchDto * chore: remove deprecated sharedUserIds property from Album AddUsersDto * chore: remove deprecated sharedUsers property from AlbumResponseDto * chore: remove deprecated sharedWithUserIds property from CreateAlbumDto * chore: remove deprecated isExternal and isReadOnly properties from AssetResponseDto * chore: remove deprecated /server-info endpoint * chore: bloody linters
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
} from 'src/dtos/album.dto';
|
||||
import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { AlbumUserEntity, AlbumUserRole } from 'src/entities/album-user.entity';
|
||||
import { AlbumUserEntity } from 'src/entities/album-user.entity';
|
||||
import { AlbumEntity } from 'src/entities/album.entity';
|
||||
import { AssetEntity } from 'src/entities/asset.entity';
|
||||
import { IAccessRepository } from 'src/interfaces/access.interface';
|
||||
@@ -115,9 +115,6 @@ export class AlbumService {
|
||||
|
||||
async create(auth: AuthDto, dto: CreateAlbumDto): Promise<AlbumResponseDto> {
|
||||
const albumUsers = dto.albumUsers || [];
|
||||
for (const userId of dto.sharedWithUserIds || []) {
|
||||
albumUsers.push({ userId, role: AlbumUserRole.EDITOR });
|
||||
}
|
||||
|
||||
for (const { userId } of albumUsers) {
|
||||
const exists = await this.userRepository.get(userId, {});
|
||||
@@ -216,15 +213,7 @@ export class AlbumService {
|
||||
return results;
|
||||
}
|
||||
|
||||
async addUsers(auth: AuthDto, id: string, { albumUsers, sharedUserIds }: AddUsersDto): Promise<AlbumResponseDto> {
|
||||
// Remove once deprecated sharedUserIds is removed
|
||||
if (!albumUsers) {
|
||||
if (!sharedUserIds) {
|
||||
throw new BadRequestException('No users provided');
|
||||
}
|
||||
albumUsers = sharedUserIds.map((userId) => ({ userId, role: AlbumUserRole.EDITOR }));
|
||||
}
|
||||
|
||||
async addUsers(auth: AuthDto, id: string, { albumUsers }: AddUsersDto): Promise<AlbumResponseDto> {
|
||||
await this.access.requirePermission(auth, Permission.ALBUM_SHARE, id);
|
||||
|
||||
const album = await this.findOrFail(id, { withAssets: false });
|
||||
|
||||
Reference in New Issue
Block a user