q-koa 13.3.6 → 13.3.7
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/core/config.js
CHANGED
|
@@ -61,7 +61,12 @@ module.exports = {
|
|
|
61
61
|
max: 1,
|
|
62
62
|
disableHeader: false,
|
|
63
63
|
whitelist: (ctx) => {
|
|
64
|
-
return [
|
|
64
|
+
return [
|
|
65
|
+
'common/getLngAndLat',
|
|
66
|
+
'weixin/mp_login',
|
|
67
|
+
'log/create',
|
|
68
|
+
'log/upsert',
|
|
69
|
+
].every((item) => {
|
|
65
70
|
return !ctx.request.url.includes(item)
|
|
66
71
|
})
|
|
67
72
|
// some logic that returns a boolean
|
|
@@ -8,7 +8,7 @@ exports.push = async ({ app, appName = '通知', url, message }) => {
|
|
|
8
8
|
const log_push_url = lodash.get(
|
|
9
9
|
app,
|
|
10
10
|
'appConfig.log.url',
|
|
11
|
-
'https://api.day.app/
|
|
11
|
+
'https://api.day.app/xJXYwBCgBvxTjCdEC4CYf5'
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
const log_push_excludes = lodash.get(app, 'appConfig.log.excludes', {
|
|
@@ -69,11 +69,13 @@ exports.initData = async ({ includes, excludes, app, ctx }) => {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const [model, fn] = url.split('/')
|
|
72
|
+
|
|
72
73
|
if (!(app.model[model] || app.controller[model])) {
|
|
73
74
|
return {
|
|
74
75
|
[item]: [],
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
|
|
77
79
|
if (is_cache && app.cache && app.cache.get(`${model}`)) {
|
|
78
80
|
const omit = data && data.omit ? data.omit : []
|
|
79
81
|
const pick = data && data.pick ? data.pick : []
|