X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-jsonld-signature.ts;h=3c706e372ee26a9b17f4ed3457fb1cf74c44e106;hb=ced38c0ffe1e7d30f1f80fe704e571f39b0cc78b;hp=749c50cb3d5c6f5de154964948d56596f493246d;hpb=338eb9d33af690db716805fd2277bf68f473b58f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-jsonld-signature.ts b/server/helpers/custom-jsonld-signature.ts index 749c50cb3..3c706e372 100644 --- a/server/helpers/custom-jsonld-signature.ts +++ b/server/helpers/custom-jsonld-signature.ts @@ -1,7 +1,8 @@ -import * as AsyncLRU from 'async-lru' -import * as jsonld from 'jsonld' +import AsyncLRU from 'async-lru' import { logger } from './logger' +import jsonld = require('jsonld') + const CACHE = { 'https://w3id.org/security/v1': { '@context': { @@ -76,6 +77,7 @@ const lru = new AsyncLRU({ } }) +/* eslint-disable no-import-assign */ jsonld.documentLoader = (url) => { return new Promise((res, rej) => { lru.get(url, (err, value) => {