chore(server): bump server dependencies (#3899)

* chore(server): bump server dependencies

* fix: test
This commit is contained in:
Alex
2023-08-28 14:41:57 -05:00
committed by GitHub
parent 26c43617d1
commit d0a06739d8
15 changed files with 6769 additions and 5037 deletions

View File

@@ -99,8 +99,8 @@ export class AlbumService {
ownerId: authUser.id,
albumName: dto.albumName,
description: dto.description,
sharedUsers: dto.sharedWithUserIds?.map((value) => ({ id: value } as UserEntity)) ?? [],
assets: (dto.assetIds || []).map((id) => ({ id } as AssetEntity)),
sharedUsers: dto.sharedWithUserIds?.map((value) => ({ id: value }) as UserEntity) ?? [],
assets: (dto.assetIds || []).map((id) => ({ id }) as AssetEntity),
albumThumbnailAssetId: dto.assetIds?.[0] || null,
});

View File

@@ -92,7 +92,7 @@ const sidecar: Record<string, string[]> = {
const isType = (filename: string, r: Record<string, string[]>) => extname(filename).toLowerCase() in r;
const lookup = (filename: string) =>
({ ...image, ...video, ...sidecar }[extname(filename).toLowerCase()]?.[0] ?? 'application/octet-stream');
({ ...image, ...video, ...sidecar })[extname(filename).toLowerCase()]?.[0] ?? 'application/octet-stream';
export const mimeTypes = {
image,

View File

@@ -176,7 +176,10 @@ class BaseConfig implements VideoCodecSWConfig {
export class BaseHWConfig extends BaseConfig implements VideoCodecHWConfig {
protected devices: string[];
constructor(protected config: SystemConfigFFmpegDto, devices: string[] = []) {
constructor(
protected config: SystemConfigFFmpegDto,
devices: string[] = [],
) {
super(config);
this.devices = this.validateDevices(devices);
}

View File

@@ -30,7 +30,7 @@ interface SyncQueue {
export class SearchService {
private logger = new Logger(SearchService.name);
private enabled = false;
private timer: NodeJS.Timer | null = null;
private timer: NodeJS.Timeout | null = null;
private configCore: SystemConfigCore;
private albumQueue: SyncQueue = {

View File

@@ -65,7 +65,7 @@ export class SharedLinkService {
userId: authUser.id,
type: dto.type,
albumId: dto.albumId || null,
assets: (dto.assetIds || []).map((id) => ({ id } as AssetEntity)),
assets: (dto.assetIds || []).map((id) => ({ id }) as AssetEntity),
description: dto.description || null,
expiresAt: dto.expiresAt || null,
allowUpload: dto.allowUpload ?? true,

View File

@@ -16,7 +16,10 @@ import { IUserRepository, UserListFilter } from './user.repository';
const SALT_ROUNDS = 10;
export class UserCore {
constructor(private userRepository: IUserRepository, private cryptoRepository: ICryptoRepository) {}
constructor(
private userRepository: IUserRepository,
private cryptoRepository: ICryptoRepository,
) {}
async updateUser(authUser: AuthUserDto, id: string, dto: Partial<UserEntity>): Promise<UserEntity> {
if (!authUser.isAdmin && authUser.id !== id) {