mm_api 1.1.3 → 1.1.4
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/api.js +4 -1
- package/package.json +1 -1
package/lib/api.js
CHANGED
|
@@ -322,7 +322,10 @@ Api.prototype._loadSql = function (file_path) {
|
|
|
322
322
|
if (!cfg) {
|
|
323
323
|
return null;
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
// 实例名必须唯一:mm_mod 的 config 按类名+名称存入共享配置存储,
|
|
326
|
+
// 不同接口的 dao.json 可能同名(如多个 "cms_article"),直接沿用会互相覆盖,
|
|
327
|
+
// 因此强制以接口名命名 Dao 实例
|
|
328
|
+
cfg.name = this.config.name || cfg.name;
|
|
326
329
|
cfg.config_file = p;
|
|
327
330
|
cfg.dir = path.dirname(p);
|
|
328
331
|
if (Dao) {
|