sumba 2.36.0 → 2.38.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.
@@ -156,13 +156,13 @@ async function hook () {
156
156
  }
157
157
  }, {
158
158
  level: 1000,
159
- name: 'dobo.driver:beforeAny',
159
+ name: 'dobo.adapter:beforeAny',
160
160
  handler: async function (model, options) {
161
161
  await this.applyActionHook({ model, options })
162
162
  }
163
163
  }, {
164
164
  level: 1000,
165
- name: 'dobo.driver:beforeCreateRecord',
165
+ name: 'dobo.adapter:beforeCreateRecord',
166
166
  handler: async function (model, body, options = {}) {
167
167
  const { get } = this.app.lib._
168
168
  const { isSet } = this.app.lib.aneka
@@ -177,7 +177,7 @@ async function hook () {
177
177
  }
178
178
  }, {
179
179
  level: 1000,
180
- name: ['dobo.driver:beforeFindRecord', 'dobo.driver:beforeFindAllRecord', 'dobo.driver:beforeCountRecord'],
180
+ name: ['dobo.adapter:beforeFindRecord', 'dobo.adapter:beforeFindAllRecord', 'dobo.adapter:beforeCountRecord'],
181
181
  handler: async function handler (model, filter, options = {}) {
182
182
  const { isEmpty } = this.app.lib._
183
183
  const { req = {} } = options
@@ -186,7 +186,7 @@ async function hook () {
186
186
  }
187
187
  }, {
188
188
  level: 1000,
189
- name: ['dobo.driver:beforeGetRecord', 'dobo.driver:beforeRemoveRecord', 'dobo.driver:beforeUpdateRecord'],
189
+ name: ['dobo.adapter:beforeGetRecord', 'dobo.adapter:beforeRemoveRecord', 'dobo.adapter:beforeUpdateRecord'],
190
190
  handler: async function (model, id, options) {
191
191
  await this.applyQueryHook(model, id, options)
192
192
  }
@@ -3,9 +3,9 @@ const get = {
3
3
  url: '/your-stuff/download/get/*',
4
4
  handler: async function (req, reply) {
5
5
  const { importModule } = this.app.bajo
6
- const handler = await importModule('waibu:/lib/handle-download.js')
6
+ const { download } = await importModule('waibu:/lib/helper.js', { asDefaultImport: false })
7
7
  const file = `${this.downloadDir}/${req.params['*']}`
8
- return await handler.call(this, file, req, reply)
8
+ return await download.call(this, file, req, reply)
9
9
  }
10
10
  }
11
11