- client: rename helper
This commit is contained in:
parent
7b29c56791
commit
1583262df1
|
@ -1,6 +1,6 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import { getPathWithQueryParams } from '../helpers/helpers';
|
import { getPathWithQueryString } from '../helpers/helpers';
|
||||||
|
|
||||||
class Api {
|
class Api {
|
||||||
baseUrl = 'control';
|
baseUrl = 'control';
|
||||||
|
@ -491,7 +491,7 @@ class Api {
|
||||||
|
|
||||||
getQueryLog(params) {
|
getQueryLog(params) {
|
||||||
const { path, method } = this.GET_QUERY_LOG;
|
const { path, method } = this.GET_QUERY_LOG;
|
||||||
const url = getPathWithQueryParams(path, params);
|
const url = getPathWithQueryString(path, params);
|
||||||
return this.makeRequest(url, method);
|
return this.makeRequest(url, method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,7 @@ export const normalizeWhois = (whois) => {
|
||||||
|
|
||||||
export const isValidQuestionType = type => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
|
export const isValidQuestionType = type => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
|
||||||
|
|
||||||
export const getPathWithQueryParams = (path, params) => {
|
export const getPathWithQueryString = (path, params) => {
|
||||||
const searchParams = new URLSearchParams(params);
|
const searchParams = new URLSearchParams(params);
|
||||||
|
|
||||||
return `${path}?${searchParams.toString()}`;
|
return `${path}?${searchParams.toString()}`;
|
||||||
|
|
Loading…
Reference in New Issue