mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
chore: lint
This commit is contained in:
@@ -63,7 +63,7 @@ describe(MaintenanceWorkerService.name, () => {
|
|||||||
describe.skip('detectMediaLocation');
|
describe.skip('detectMediaLocation');
|
||||||
|
|
||||||
describe('setStatus', () => {
|
describe('setStatus', () => {
|
||||||
it('should broadcast status', async () => {
|
it('should broadcast status', () => {
|
||||||
maintenanceEphemeralStateRepositoryMock.getPublicStatus.mockReturnValue({
|
maintenanceEphemeralStateRepositoryMock.getPublicStatus.mockReturnValue({
|
||||||
action: MaintenanceAction.Start,
|
action: MaintenanceAction.Start,
|
||||||
error: 'mock',
|
error: 'mock',
|
||||||
@@ -446,7 +446,7 @@ describe(MaintenanceWorkerService.name, () => {
|
|||||||
|
|
||||||
it('should write file', async () => {
|
it('should write file', async () => {
|
||||||
await sut.uploadBackup({ originalname: 'path.sql.gz' } as never);
|
await sut.uploadBackup({ originalname: 'path.sql.gz' } as never);
|
||||||
expect(mocks.storage.overwriteFile).toBeCalledWith('/data/backups/uploaded-path.sql.gz', undefined);
|
expect(mocks.storage.overwriteFile).toBeCalledWith('/data/backups/uploaded-path.sql.gz');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ describe(MaintenanceService.name, () => {
|
|||||||
|
|
||||||
it('should write file', async () => {
|
it('should write file', async () => {
|
||||||
await sut.uploadBackup({ originalname: 'path.sql.gz' } as never);
|
await sut.uploadBackup({ originalname: 'path.sql.gz' } as never);
|
||||||
expect(mocks.storage.overwriteFile).toBeCalledWith('/data/backups/uploaded-path.sql.gz', undefined);
|
expect(mocks.storage.overwriteFile).toBeCalledWith('/data/backups/uploaded-path.sql.gz');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export class FilenameParamDto {
|
|||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiProperty({ format: 'string' })
|
@ApiProperty({ format: 'string' })
|
||||||
@Matches(/^[a-zA-Z0-9_\-\.]+$/, {
|
@Matches(/^[a-zA-Z0-9_\-.]+$/, {
|
||||||
message: 'Filename contains invalid characters',
|
message: 'Filename contains invalid characters',
|
||||||
})
|
})
|
||||||
filename!: string;
|
filename!: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user