Ver código fonte

Minor rename

Vishnu Mohandas 4 anos atrás
pai
commit
51afe4d8fc
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      src/services/fileService.ts

+ 3 - 3
src/services/fileService.ts

@@ -2,7 +2,7 @@ import { getEndpoint } from "utils/common/apiUtil";
 import HTTPService from "./HTTPService";
 import * as Comlink from "comlink";
 
-const Crypto = typeof window !== 'undefined'
+const CryptoWorker = typeof window !== 'undefined'
     && Comlink.wrap(new Worker("worker/crypto.worker.js", { type: 'module' }));
 const ENDPOINT = getEndpoint();
 
@@ -35,12 +35,12 @@ export interface fileData {
 };
 
 const getFileMetaDataUsingWorker = async (data: any, key: string) => {
-    const worker = await new Crypto();
+    const worker = await new CryptoWorker();
     return worker.decryptMetadata({ data, key });
 }
 
 const getFileUsingWorker = async (data: any, key: string) => {
-    const worker = await new Crypto();
+    const worker = await new CryptoWorker();
     return worker.decryptThumbnail({ data, key });
 }