mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
refactor(server): rename filesystem provider -> storage repo (#8277)
rename filesystem provider -> storage repo
This commit is contained in:
parent
d431d37454
commit
c56c04a82b
3 changed files with 8 additions and 8 deletions
|
@ -78,7 +78,6 @@ import { AuditRepository } from 'src/repositories/audit.repository';
|
|||
import { CryptoRepository } from 'src/repositories/crypto.repository';
|
||||
import { DatabaseRepository } from 'src/repositories/database.repository';
|
||||
import { EventRepository } from 'src/repositories/event.repository';
|
||||
import { FilesystemProvider } from 'src/repositories/filesystem.provider';
|
||||
import { JobRepository } from 'src/repositories/job.repository';
|
||||
import { LibraryRepository } from 'src/repositories/library.repository';
|
||||
import { MachineLearningRepository } from 'src/repositories/machine-learning.repository';
|
||||
|
@ -91,6 +90,7 @@ import { PersonRepository } from 'src/repositories/person.repository';
|
|||
import { SearchRepository } from 'src/repositories/search.repository';
|
||||
import { ServerInfoRepository } from 'src/repositories/server-info.repository';
|
||||
import { SharedLinkRepository } from 'src/repositories/shared-link.repository';
|
||||
import { StorageRepository } from 'src/repositories/storage.repository';
|
||||
import { SystemConfigRepository } from 'src/repositories/system-config.repository';
|
||||
import { SystemMetadataRepository } from 'src/repositories/system-metadata.repository';
|
||||
import { TagRepository } from 'src/repositories/tag.repository';
|
||||
|
@ -216,7 +216,7 @@ const repositories: Provider[] = [
|
|||
{ provide: IServerInfoRepository, useClass: ServerInfoRepository },
|
||||
{ provide: ISharedLinkRepository, useClass: SharedLinkRepository },
|
||||
{ provide: ISearchRepository, useClass: SearchRepository },
|
||||
{ provide: IStorageRepository, useClass: FilesystemProvider },
|
||||
{ provide: IStorageRepository, useClass: StorageRepository },
|
||||
{ provide: ISystemConfigRepository, useClass: SystemConfigRepository },
|
||||
{ provide: ISystemMetadataRepository, useClass: SystemMetadataRepository },
|
||||
{ provide: ITagRepository, useClass: TagRepository },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import mockfs from 'mock-fs';
|
||||
import { CrawlOptionsDto } from 'src/dtos/library.dto';
|
||||
import { FilesystemProvider } from 'src/repositories/filesystem.provider';
|
||||
import { StorageRepository } from 'src/repositories/storage.repository';
|
||||
|
||||
interface Test {
|
||||
test: string;
|
||||
|
@ -179,11 +179,11 @@ const tests: Test[] = [
|
|||
},
|
||||
];
|
||||
|
||||
describe(FilesystemProvider.name, () => {
|
||||
let sut: FilesystemProvider;
|
||||
describe(StorageRepository.name, () => {
|
||||
let sut: StorageRepository;
|
||||
|
||||
beforeEach(() => {
|
||||
sut = new FilesystemProvider();
|
||||
sut = new StorageRepository();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
|
@ -18,8 +18,8 @@ import { ImmichLogger } from 'src/utils/logger';
|
|||
import { mimeTypes } from 'src/utils/mime-types';
|
||||
|
||||
@Instrumentation()
|
||||
export class FilesystemProvider implements IStorageRepository {
|
||||
private logger = new ImmichLogger(FilesystemProvider.name);
|
||||
export class StorageRepository implements IStorageRepository {
|
||||
private logger = new ImmichLogger(StorageRepository.name);
|
||||
|
||||
readdir(folder: string): Promise<string[]> {
|
||||
return fs.readdir(folder);
|
Loading…
Reference in a new issue