소스 검색

0.0.19的bug

lrf 3 년 전
부모
커밋
baa6c35cf6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lib/plugin/egg-multi-tenancy/app/extend/application.js

+ 2 - 2
lib/plugin/egg-multi-tenancy/app/extend/application.js

@@ -30,7 +30,7 @@ const multiTenancyPlugin = (schema, options = {}) => {
 
   schema.pre('save', async function() {
     const tenant = schema.get('x-tenant');
-    if (tenant !== 'defaultTenant') {
+    if (tenant !== defaultTenant) {
       this._tenant = schema.get('x-tenant');
     }
   });
@@ -39,7 +39,7 @@ const multiTenancyPlugin = (schema, options = {}) => {
   querys.forEach(action => {
     schema.pre(action, async function() {
       const tenant = schema.get('x-tenant');
-      if (tenant !== 'defaultTenant') {
+      if (tenant !== defaultTenant) {
         this.where('_tenant').equals(schema.get('x-tenant'));
       }
     });