Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jan 9, 2018
1 parent 7d26ca6 commit 52fc4d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/core/runtime/dns-browser.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
'use strict'

const dns = require('dns')

module.exports = (domain, opts, callback) => {
domain = encodeURIComponent(domain)
const url = `https://ipfs.io/api/v0/dns?arg=${domain}`
let url = `https://ipfs.io/api/v0/dns?arg=${domain}`

for (const prop in opts) {
url += `&${prop}=${opts[prop]}`
}

fetch(url, {mode: 'cors'})
window.fetch(url, {mode: 'cors'})
.then((response) => {
const resp = response.json()
if (resp.Path) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/runtime/dns-nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (domain, opts, callback) => {
for (const record of records) {
if (record[0].startsWith('dnslink=')) {
return callback(null, record[0].substr(8, record[0].length - 1))
}
}
}

callback(new Error('domain does not have a txt dnslink entry'))
Expand Down

0 comments on commit 52fc4d7

Please sign in to comment.