Minor rename

This commit is contained in:
Vishnu Mohandas 2020-10-01 02:54:40 +05:30
parent 3559e68490
commit 51afe4d8fc

View file

@ -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 });
}