fix: Remove new keyword when using RPCReflection

This commit is contained in:
Harsh Gupta (aider) 2024-08-14 14:39:32 +05:30
parent 4e9b6b7ca5
commit e9ac98a628

View File

@ -567,7 +567,7 @@ ${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`;
} }
async crawl(req: Request, res: Response) { async crawl(req: Request, res: Response) {
const rpcReflect = new RPCReflection(); const rpcReflect: RPCReflection = {};
const ctx = { req, res }; const ctx = { req, res };
const crawlerOptionsHeaderOnly = CrawlerOptionsHeaderOnly.from(req.headers); const crawlerOptionsHeaderOnly = CrawlerOptionsHeaderOnly.from(req.headers);
const crawlerOptionsParamsAllowed = CrawlerOptions.from(req.method === 'POST' ? req.body : req.query); const crawlerOptionsParamsAllowed = CrawlerOptions.from(req.method === 'POST' ? req.body : req.query);