mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
4.8.5 test fix (#1835)
* faq * perf: navbar name and fix dataset selector * feat: app tag * perf: icon * fix: update workflow bug * perf: dataset ui * perf: menu * fix: ts * fix: auth file and app list ui * app list * app list * perf: init api * update per * log level
This commit is contained in:
@@ -13,7 +13,7 @@ export const NextEntry = ({ beforeCallback = [] }: { beforeCallback?: Promise<an
|
||||
return (...args: NextApiHandler[]): NextApiHandler => {
|
||||
return async function api(req: ApiRequestProps, res: NextApiResponse) {
|
||||
const start = Date.now();
|
||||
addLog.info(`Request start ${req.url}`);
|
||||
addLog.debug(`Request start ${req.url}`);
|
||||
try {
|
||||
await Promise.all([withNextCors(req, res), ...beforeCallback]);
|
||||
|
||||
@@ -24,7 +24,7 @@ export const NextEntry = ({ beforeCallback = [] }: { beforeCallback?: Promise<an
|
||||
|
||||
const contentType = res.getHeader('Content-Type');
|
||||
|
||||
addLog.info(`Request finish ${req.url}, time: ${Date.now() - start}ms`);
|
||||
addLog.debug(`Request finish ${req.url}, time: ${Date.now() - start}ms`);
|
||||
|
||||
if ((!contentType || contentType === 'application/json') && !res.writableFinished) {
|
||||
return jsonRes(res, {
|
||||
|
Reference in New Issue
Block a user