dobo 1.2.0 → 1.2.2
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 +2 -1
- package/package.json +1 -1
- package/plugin-method/model/exists.js +1 -1
package/index.js
CHANGED
|
@@ -369,7 +369,8 @@ async function factory (pkgName) {
|
|
|
369
369
|
|
|
370
370
|
listAttachments = async ({ model, id = '*', field = '*', file = '*' } = {}, { uriEncoded = true } = {}) => {
|
|
371
371
|
const { map, kebabCase } = this.lib._
|
|
372
|
-
const {
|
|
372
|
+
const { pascalCase } = this.lib.aneka
|
|
373
|
+
const { importPkg, getPluginDataDir } = this.app.bajo
|
|
373
374
|
const mime = await importPkg('waibu:mime')
|
|
374
375
|
const { fastGlob } = this.lib
|
|
375
376
|
const root = `${getPluginDataDir('dobo')}/attachment`
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ async function exists (name, thrown, options = {}) {
|
|
|
16
16
|
await runHook(`${this.name}.${camelCase(name)}:afterModelExists`, exist, options)
|
|
17
17
|
await runHook(`${this.name}:afterModelExists`, schema, exist, options)
|
|
18
18
|
}
|
|
19
|
-
if (!exist && thrown) throw this.error('modelNotExists%s')
|
|
19
|
+
if (!exist && thrown) throw this.error('modelNotExists%s', name)
|
|
20
20
|
cache[name] = exist
|
|
21
21
|
return exist
|
|
22
22
|
}
|