Minor rename
This commit is contained in:
parent
3559e68490
commit
51afe4d8fc
1 changed files with 3 additions and 3 deletions
|
@ -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 });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue