mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 09:13:15 +03:00
refactor: test mocks (#16008)
This commit is contained in:
@@ -5,7 +5,7 @@ import { basename, extname, isAbsolute } from 'node:path';
|
||||
import { promisify } from 'node:util';
|
||||
import { CacheControl } from 'src/enum';
|
||||
import { ImmichReadStream } from 'src/interfaces/storage.interface';
|
||||
import { ILoggingRepository } from 'src/types';
|
||||
import { LoggingRepository } from 'src/repositories/logging.repository';
|
||||
import { isConnectionAborted } from 'src/utils/misc';
|
||||
|
||||
export function getFileNameWithoutExtension(path: string): string {
|
||||
@@ -37,7 +37,7 @@ export const sendFile = async (
|
||||
res: Response,
|
||||
next: NextFunction,
|
||||
handler: () => Promise<ImmichFileResponse>,
|
||||
logger: ILoggingRepository,
|
||||
logger: LoggingRepository,
|
||||
): Promise<void> => {
|
||||
const _sendFile = (path: string, options: SendFileOptions) =>
|
||||
promisify<string, SendFileOptions>(res.sendFile).bind(res)(path, options);
|
||||
|
||||
Reference in New Issue
Block a user