q-koa 13.8.42 → 13.8.43
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.
|
@@ -269,7 +269,9 @@ exports.initData = async ({ includes, excludes, app, ctx }) => {
|
|
|
269
269
|
if (obj.setting && apiVersion && cacheVersion) {
|
|
270
270
|
let target = null
|
|
271
271
|
if (config) {
|
|
272
|
-
const
|
|
272
|
+
const application_key = `${app.appConfig.appName}-application`
|
|
273
|
+
|
|
274
|
+
const application = app.cache.get(application_key)
|
|
273
275
|
if (application) {
|
|
274
276
|
target = application.find((a) => a.config === config)
|
|
275
277
|
}
|
package/core/file/utils/index.js
CHANGED
|
@@ -189,8 +189,11 @@ exports.getImageType = (fileBuffer) => {
|
|
|
189
189
|
|
|
190
190
|
exports.getAppConfig = async ({ app, config, key, app_id, id }) => {
|
|
191
191
|
if (!(app && (config || key || app_id || id))) return null
|
|
192
|
+
|
|
193
|
+
const application_key = `${app.appConfig.appName}-application`
|
|
194
|
+
|
|
192
195
|
const application =
|
|
193
|
-
app.cache.get(
|
|
196
|
+
app.cache.get(application_key) || (await app.model.application.findAll())
|
|
194
197
|
const target = application.find(findConfig(config || key || app_id || id))
|
|
195
198
|
|
|
196
199
|
return target || null
|