waibu-db 2.32.1 → 2.32.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/lib/crud/export-handler.js +5 -4
- package/package.json +1 -1
- package/wiki/CHANGES.md +4 -0
|
@@ -45,15 +45,16 @@ async function exportHandler (opts = {}) {
|
|
|
45
45
|
data.opts.lang = req.lang
|
|
46
46
|
data.opts.fields = isEmpty(req.query.fields) ? get(schema, 'view.fields', []) : req.query.fields.split(',')
|
|
47
47
|
|
|
48
|
-
data.opts.
|
|
49
|
-
data.opts.
|
|
50
|
-
data.opts.
|
|
48
|
+
data.opts.datetime = get(opts, 'req.site.setting.bajo.intl.datetime', this.app.bajo.config.intl.datetime)
|
|
49
|
+
data.opts.date = get(opts, 'req.site.setting.bajo.intl.date', this.app.bajo.config.intl.date)
|
|
50
|
+
data.opts.time = get(opts, 'req.site.setting.bajo.intl.time', this.app.bajo.config.intl.time)
|
|
51
|
+
data.opts.timeZone = get(opts, 'req.site.setting.bajo.intl.timeZone', this.app.bajo.config.intl.timeZone)
|
|
52
|
+
|
|
51
53
|
const source = `${this.ns}:/export-handler`
|
|
52
54
|
const worker = `${this.ns}:exportData`
|
|
53
55
|
const type = get(crud, 'input.ftype', 'json')
|
|
54
56
|
data.exportOpts = get(crud, 'input.options', '').split(',')
|
|
55
57
|
const ext = data.exportOpts.includes('zip') ? `${type}.gz` : type
|
|
56
|
-
// const file = `${kebabCase(model)}_${dayjs().format('YYYYMMDDhhmmss')}.${ext}`
|
|
57
58
|
const file = `${kebabCase(model)}.${ext}`
|
|
58
59
|
if (this.app.sumba) {
|
|
59
60
|
const description = kebabCase(model).split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ')
|
package/package.json
CHANGED