feat(net-tool): 支持json返回类型
All checks were successful
/ release (push) Successful in 27s

This commit is contained in:
zhaoyingbo 2024-09-27 02:58:12 +00:00
parent b7766662e9
commit 431f600af1

View File

@ -479,6 +479,17 @@ class NetTool extends NetToolBase {
})
}
/**
* 200 OK的响应对象
*
* @param data -
* @returns 200 OK的响应对象
*/
json(data: any) {
this.logger.info(`return a json response: ${JSON.stringify(data)}`)
return Response.json(data)
}
/**
* 200 OK的健康检查响应对象
*