waibu-rest-api 2.5.1 → 2.6.0

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.
@@ -44,7 +44,7 @@ async function routeByModelBuilder ({ file, dir, pathPrefix, ns, parent }) {
44
44
  options.queryHandler = builder.queryHandler
45
45
  if (method === 'replace') options.partial = false
46
46
  if (['get', 'remove', 'update'].includes(method)) options.throwNotFound = true
47
- const data = await helper({ model: builder.model, req, reply, options })
47
+ const data = await helper({ model: builder.model, req, reply, options, transaction: builder.transaction })
48
48
  data.success = true
49
49
  data.statusCode = method === 'create' ? 201 : 200
50
50
  if (method === 'find') options.forFind = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-rest-api",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
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-03-05
4
+
5
+ - [2.6.0] Add transaction support by setting property ```transaction: true``` on model's route handler definition
6
+
3
7
  ## 2026-02-23
4
8
 
5
9
  - [2.5.1] Bug fix on ```transformResult()```