refactor: Use path alias
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import fetch from 'node-fetch';
|
||||
import { URLSearchParams } from 'url';
|
||||
import { getAgentByUrl } from './fetch';
|
||||
import config from '../config';
|
||||
import config from '@/config';
|
||||
|
||||
export async function verifyRecaptcha(secret: string, response: string) {
|
||||
const result = await getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import config from '../config';
|
||||
import config from '@/config';
|
||||
import { toASCII } from 'punycode';
|
||||
|
||||
export function getFullApAccount(username: string, host: string | null) {
|
||||
|
@ -4,7 +4,7 @@ import * as util from 'util';
|
||||
import fetch from 'node-fetch';
|
||||
import { getAgentByUrl } from './fetch';
|
||||
import { AbortController } from 'abort-controller';
|
||||
import config from '../config';
|
||||
import config from '@/config';
|
||||
import * as chalk from 'chalk';
|
||||
import Logger from '../services/logger';
|
||||
|
||||
|
@ -4,7 +4,7 @@ import * as cache from 'lookup-dns-cache';
|
||||
import fetch, { HeadersInit } from 'node-fetch';
|
||||
import { HttpProxyAgent } from 'http-proxy-agent';
|
||||
import { HttpsProxyAgent } from 'https-proxy-agent';
|
||||
import config from '../config';
|
||||
import config from '@/config';
|
||||
import { URL } from 'url';
|
||||
|
||||
export async function getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: HeadersInit) {
|
||||
|
@ -3,7 +3,7 @@ import { genAid } from './id/aid';
|
||||
import { genMeid } from './id/meid';
|
||||
import { genMeidg } from './id/meidg';
|
||||
import { genObjectId } from './id/object-id';
|
||||
import config from '../config';
|
||||
import config from '@/config';
|
||||
|
||||
const metohd = config.id.toLowerCase();
|
||||
|
||||
|
Reference in New Issue
Block a user