diff --git a/src/services/storage/tlv/tlvFilesStorageFactory.ts b/src/services/storage/tlv/tlvFilesStorageFactory.ts index f75e5bb9..cab84a2d 100644 --- a/src/services/storage/tlv/tlvFilesStorageFactory.ts +++ b/src/services/storage/tlv/tlvFilesStorageFactory.ts @@ -62,7 +62,7 @@ export class TlvStorageFactory extends EventEmitter { async LoadLatest(storageName: string, limit?: number): Promise { const opId = Math.random().toString() - const op: LoadLatestTlvOperation = { type: 'loadLatestTlv', opId, storageName, limit, debug: true } + const op: LoadLatestTlvOperation = { type: 'loadLatest', opId, storageName, limit, debug: true } const latestData = await this.handleOp(op) const deserializedLatestData: LatestData = {} for (const appId in latestData) { @@ -76,7 +76,7 @@ export class TlvStorageFactory extends EventEmitter { async LoadFile(storageName: string, appId: string, dataName: string, chunk: number): Promise { const opId = Math.random().toString() - const op: LoadTlvFileOperation = { type: 'loadTlvFile', opId, storageName, appId, dataName, chunk, debug: true } + const op: LoadTlvFileOperation = { type: 'loadFile', opId, storageName, appId, dataName, chunk, debug: true } const tlvFile = await this.handleOp(op) return { fileData: Buffer.from(tlvFile.base64fileData, 'base64'), chunks: tlvFile.chunks } } diff --git a/src/services/storage/tlv/tlvFilesStorageProcessor.ts b/src/services/storage/tlv/tlvFilesStorageProcessor.ts index bef1d3e7..780e4bef 100644 --- a/src/services/storage/tlv/tlvFilesStorageProcessor.ts +++ b/src/services/storage/tlv/tlvFilesStorageProcessor.ts @@ -25,7 +25,7 @@ export type AddTlvOperation = { } export type LoadLatestTlvOperation = { - type: 'loadLatestTlv' + type: 'loadLatest' opId: string storageName: string limit?: number @@ -33,7 +33,7 @@ export type LoadLatestTlvOperation = { } export type LoadTlvFileOperation = { - type: 'loadTlvFile' + type: 'loadFile' opId: string storageName: string appId: string @@ -82,10 +82,10 @@ class TlvFilesStorageProcessor { case 'addTlv': await this.handleAddTlv(operation); break; - case 'loadLatestTlv': + case 'loadLatest': await this.handleLoadLatestTlv(operation); break; - case 'loadTlvFile': + case 'loadFile': await this.handleLoadTlvFile(operation); break; default: