mirror of
https://github.com/TheodoreKrypton/tgfs
synced 2024-11-21 22:55:40 +00:00
rename file-ref-api to file-api
This commit is contained in:
parent
c6eec4a7f0
commit
a9c3126a29
@ -6,7 +6,7 @@ import { FileDescApi } from './file-desc-api';
|
||||
import { MetaDataApi } from './metadata-api';
|
||||
import { GeneralFileMessage } from './model';
|
||||
|
||||
export class FileRefApi {
|
||||
export class FileApi {
|
||||
constructor(
|
||||
private readonly metadataApi: MetaDataApi,
|
||||
private readonly fileDescApi: FileDescApi,
|
@ -2,8 +2,8 @@ import { gramjs, telegraf } from 'src/api/impl';
|
||||
import { config } from 'src/config';
|
||||
|
||||
import { DirectoryApi } from './directory-api';
|
||||
import { FileApi } from './file-api';
|
||||
import { FileDescApi } from './file-desc-api';
|
||||
import { FileRefApi } from './file-ref-api';
|
||||
import { MessageApi } from './message-api';
|
||||
import { MetaDataApi } from './metadata-api';
|
||||
import { TGMsgFDRepository } from './repository/impl/fd/tg-msg';
|
||||
@ -28,22 +28,21 @@ export const createClient = async () => {
|
||||
const metadataApi = new MetaDataApi(metadataRepo);
|
||||
await metadataApi.init();
|
||||
|
||||
const frApi = new FileRefApi(metadataApi, fdApi);
|
||||
const fileApi = new FileApi(metadataApi, fdApi);
|
||||
const dirApi = new DirectoryApi(metadataApi);
|
||||
|
||||
return new Client(metadataApi, frApi, dirApi);
|
||||
return new Client(fileApi, dirApi);
|
||||
};
|
||||
|
||||
export class Client {
|
||||
file: FileRefApi;
|
||||
file: FileApi;
|
||||
dir: DirectoryApi;
|
||||
|
||||
constructor(
|
||||
private readonly metadataApi: MetaDataApi,
|
||||
private readonly frApi: FileRefApi,
|
||||
private readonly fileApi: FileApi,
|
||||
private readonly dirApi: DirectoryApi,
|
||||
) {
|
||||
this.file = this.frApi;
|
||||
this.file = this.fileApi;
|
||||
this.dir = this.dirApi;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user