From 066c7e2d1feefd54b49dbc08e125dfc84cfdbe67 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 1 Oct 2021 15:49:46 +0200 Subject: [PATCH] eth.link api --- packages/ipfs-api/src/server.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ipfs-api/src/server.ts b/packages/ipfs-api/src/server.ts index ef21de6d..559febb8 100644 --- a/packages/ipfs-api/src/server.ts +++ b/packages/ipfs-api/src/server.ts @@ -4,6 +4,7 @@ import fs from "fs"; import got from "got"; import { extension as toExtension } from "mime-types"; import { Collection } from "mongodb"; +import { convertSkylinkToBase64 } from "skynet-js"; import { API_HOSTNAME, API_PORT, MONGO_CONNECTIONSTRING, MONGO_DBNAME, UPLOAD_PATH } from "./consts"; import { MongoDB } from "./mongodb"; import { IRecord } from "./types"; @@ -36,6 +37,8 @@ require("dotenv").config(); app.get("/ipfs/eth/dns-query/:name", async (req: Request, res: Response) => { try { + console.log(`https://eth.link/dns-query?type=TXT&name=${req.params.name}`); + const response = await got(`https://eth.link/dns-query?type=TXT&name=${req.params.name}`, { headers: { "content-type": "application/dns-json" }, }).json();