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.
- package/docs/Sumba.html +1 -1
- package/docs/data/search.json +1 -1
- package/docs/index.js.html +229 -243
- package/extend/bajo/hook.js +4 -4
- package/extend/waibuMpa/route/your-stuff/download/get.js +2 -2
- package/index.js +229 -243
- package/package.json +1 -1
- package/wiki/CHANGES.md +9 -0
package/extend/bajo/hook.js
CHANGED
|
@@ -156,13 +156,13 @@ async function hook () {
|
|
|
156
156
|
}
|
|
157
157
|
}, {
|
|
158
158
|
level: 1000,
|
|
159
|
-
name: 'dobo.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
6
|
+
const { download } = await importModule('waibu:/lib/helper.js', { asDefaultImport: false })
|
|
7
7
|
const file = `${this.downloadDir}/${req.params['*']}`
|
|
8
|
-
return await
|
|
8
|
+
return await download.call(this, file, req, reply)
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|