mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
Changed import statements from alias-based paths (e.g., '@/napcat-common/store') to direct module references (e.g., 'napcat-common/src/store') in Proxy.ts, Status.ts, Data.ts, and SignToken.ts for improved compatibility and clarity.
15 lines
502 B
TypeScript
15 lines
502 B
TypeScript
import { RequestHandler } from 'express';
|
|
import { RequestUtil } from 'napcat-common/src/request';
|
|
import { sendError, sendSuccess } from '../utils/response';
|
|
|
|
export const GetProxyHandler: RequestHandler = async (req, res) => {
|
|
let { url } = req.query;
|
|
if (url && typeof url === 'string') {
|
|
url = decodeURIComponent(url);
|
|
const responseText = await RequestUtil.HttpGetText(url);
|
|
return sendSuccess(res, responseText);
|
|
} else {
|
|
return sendError(res, 'url参数不合法');
|
|
}
|
|
};
|