MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / next

Method next

packages/message/server.ts:274–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

272 let index = 0;
273
274 const next = async (): Promise<any> => {
275 if (index < this.middlewares.length) {
276 const middleware = this.middlewares[index++];
277 return await middleware(params, con, next);
278 } else {
279 // 所有中间件都执行完毕,执行最终的处理函数
280 return await func(params, con);
281 }
282 };
283
284 return await next();
285 });

Callers

nothing calls this directly

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected