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('setStatus', () => {
|
||||
it('should broadcast status', async () => {
|
||||
it('should broadcast status', () => {
|
||||
maintenanceEphemeralStateRepositoryMock.getPublicStatus.mockReturnValue({
|
||||
action: MaintenanceAction.Start,
|
||||
error: 'mock',
|
||||
@@ -446,7 +446,7 @@ describe(MaintenanceWorkerService.name, () => {
|
||||
|
||||
it('should write file', async () => {
|
||||
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 () => {
|
||||
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()
|
||||
@IsString()
|
||||
@ApiProperty({ format: 'string' })
|
||||
@Matches(/^[a-zA-Z0-9_\-\.]+$/, {
|
||||
@Matches(/^[a-zA-Z0-9_\-.]+$/, {
|
||||
message: 'Filename contains invalid characters',
|
||||
})
|
||||
filename!: string;
|
||||
|
||||
Reference in New Issue
Block a user