From 996953a10a278802151e7fcd419f901a8c88c334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Tue, 18 Oct 2022 00:09:41 +0000 Subject: [PATCH] dnslink-ipfs: minor improvements (ref. #61) --- plugins/dnslink-ipfs/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/dnslink-ipfs/index.js b/plugins/dnslink-ipfs/index.js index ad44010..56fccf8 100644 --- a/plugins/dnslink-ipfs/index.js +++ b/plugins/dnslink-ipfs/index.js @@ -108,9 +108,12 @@ case 'ico': contentType = 'image/x-icon'; break; + case 'json': + contentType = 'application/json'; + break; } - console.log(" +-- guessed contentType : " + contentType); - + LR.log(pluginName, " +-- guessed contentType : " + contentType); + // TODO: error handling! return ipfs.name.resolve('/ipns/' + dnslinkAddr).next().then(ipfsaddr => { @@ -176,7 +179,7 @@ * TODO: to be implemented */ let publishContent = (resource, user, password) => { - return new Error("Not implemented yet.") + throw new Error("Not implemented yet.") } /* ========================================================================= *\