chore(net-tool): json返回支持默认值
All checks were successful
/ release (push) Successful in 27s

This commit is contained in:
zhaoyingbo 2024-09-27 02:59:55 +00:00
parent 5351ea6ecf
commit 08d4170f7e

View File

@ -485,7 +485,7 @@ class NetTool extends NetToolBase {
* @param data -
* @returns 200 OK的响应对象
*/
json(data: any) {
json(data = {}) {
this.logger.info(`return a json response: ${JSON.stringify(data)}`)
return Response.json(data)
}