waibu-rest-api 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -108,8 +108,9 @@ async function factory (pkgName) {
108
108
  const { forOwn, get } = this.app.lib._
109
109
  const newData = {}
110
110
  forOwn(data, (v, k) => {
111
- let key = get(this.config, `responseKey.${k}`, k)
111
+ let key = get(this.config, `responseKey.${k}`)
112
112
  if (options.forFind && k === 'data') key = get(this.config, 'responseKey.data')
113
+ if (!key) return undefined
113
114
  newData[key] = v
114
115
  })
115
116
  return newData
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-rest-api",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "REST API for Waibu",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-02-23
4
+
5
+ - [2.5.1] Bug fix on ```transformResult()```
6
+
3
7
  ## 2026-02-22
4
8
 
5
9
  - [2.5.0] Add warnings to the response objects