主文件功能拆分
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 后端实例注入中间件
|
||||
* 将PixivBackend实例注入到请求对象中,供后续中间件和路由处理器使用
|
||||
*/
|
||||
|
||||
function backendInjector(backend) {
|
||||
return (req, res, next) => {
|
||||
req.backend = backend;
|
||||
next();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { backendInjector };
|
||||
Reference in New Issue
Block a user