Compare commits

...

2 Commits

Author SHA1 Message Date
3908a401a5 chore(release): publish
- @egg/net-tool@1.7.1
2024-09-27 03:00:20 +00:00
08d4170f7e chore(net-tool): json返回支持默认值
All checks were successful
/ release (push) Successful in 27s
2024-09-27 02:59:55 +00:00
4 changed files with 7 additions and 3 deletions

2
package-lock.json generated
View File

@ -12272,7 +12272,7 @@
},
"packages/net-tool": {
"name": "@egg/net-tool",
"version": "1.7.0",
"version": "1.7.1",
"license": "ISC",
"dependencies": {
"@egg/logger": "^1.4.3",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.7.1](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.7.0...@egg/net-tool@1.7.1) (2024-09-27)
**Note:** Version bump only for package @egg/net-tool
# 1.7.0 (2024-09-27)
### Features

View File

@ -1,6 +1,6 @@
{
"name": "@egg/net-tool",
"version": "1.7.0",
"version": "1.7.1",
"description": "Net Tools for Egg projects",
"type": "module",
"main": "src/index.ts",

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)
}