Reformat code
This commit is contained in:
parent
4c9d9a5413
commit
a0d4d86867
1 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ class DohResolver {
|
||||||
* @param timeout {number} the number of milliseconds to wait for a response before aborting the request
|
* @param timeout {number} the number of milliseconds to wait for a response before aborting the request
|
||||||
* @returns {Promise<object>} The DNS response received
|
* @returns {Promise<object>} The DNS response received
|
||||||
*/
|
*/
|
||||||
query(qname, qtype='TXT', timeout=null) {
|
query(qname, qtype = 'TXT', timeout = null) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let dnsMessage = makeQuery(qname, qtype);
|
let dnsMessage = makeQuery(qname, qtype);
|
||||||
sendDohMsg(dnsMessage, this.nameserver_url, timeout)
|
sendDohMsg(dnsMessage, this.nameserver_url, timeout)
|
||||||
|
|
@ -41,7 +41,7 @@ class DohResolver {
|
||||||
* @param qtype {string} the query type to put in the query message (e.g. A, AAAA, DS, DNSKEY)
|
* @param qtype {string} the query type to put in the query message (e.g. A, AAAA, DS, DNSKEY)
|
||||||
* @returns {object} The DNS query message
|
* @returns {object} The DNS query message
|
||||||
*/
|
*/
|
||||||
function makeQuery(qname, qtype='TXT') {
|
function makeQuery(qname, qtype = 'TXT') {
|
||||||
return {
|
return {
|
||||||
type: 'query',
|
type: 'query',
|
||||||
id: 0,
|
id: 0,
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue