Quellcode durchsuchen

Use camelCase.

Thanks to xet7 !

Related #802
Lauri Ojansivu vor 6 Jahren
Ursprung
Commit
74a4926e83
2 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen
  1. 5 5
      models/org.js
  2. 6 6
      models/orgUser.js

+ 5 - 5
models/org.js

@@ -14,7 +14,7 @@ Org.attachSchema(
       // eslint-disable-next-line consistent-return
       // eslint-disable-next-line consistent-return
       autoValue() {
       autoValue() {
         if (this.isInsert && !this.isSet) {
         if (this.isInsert && !this.isSet) {
-          return incrementCounter('counters', 'org_id', 1);
+          return incrementCounter('counters', 'orgId', 1);
         }
         }
       },
       },
     },
     },
@@ -65,9 +65,9 @@ Org.attachSchema(
       optional: true,
       optional: true,
       max: 255,
       max: 255,
     },
     },
-    zip_code: {
+    zipCode: {
       /**
       /**
-       * zip_code of the organization
+       * zipCode of the organization
        */
        */
       type: String,
       type: String,
       optional: true,
       optional: true,
@@ -81,9 +81,9 @@ Org.attachSchema(
       optional: true,
       optional: true,
       max: 255,
       max: 255,
     },
     },
-    billing_email: {
+    billingEmail: {
       /**
       /**
-       * billing_email of the organization
+       * billingEmail of the organization
        */
        */
       type: String,
       type: String,
       optional: true,
       optional: true,

+ 6 - 6
models/orgUser.js

@@ -1,4 +1,4 @@
-OrgUser = new Mongo.Collection('org_user');
+OrgUser = new Mongo.Collection('orgUser');
 
 
 /**
 /**
  * A Organization User in wekan
  * A Organization User in wekan
@@ -14,18 +14,18 @@ OrgUser.attachSchema(
       // eslint-disable-next-line consistent-return
       // eslint-disable-next-line consistent-return
       autoValue() {
       autoValue() {
         if (this.isInsert && !this.isSet) {
         if (this.isInsert && !this.isSet) {
-          return incrementCounter('counters', 'org_user_id', 1);
+          return incrementCounter('counters', 'orgUserId', 1);
         }
         }
       },
       },
     },
     },
-    org_id: {
+    orgId: {
       /**
       /**
        * the organization id
        * the organization id
        */
        */
       type: Number,
       type: Number,
       optional: true,
       optional: true,
     },
     },
-    user_id: {
+    userId: {
       /**
       /**
        * the user id
        * the user id
        */
        */
@@ -72,8 +72,8 @@ OrgUser.attachSchema(
 if (Meteor.isServer) {
 if (Meteor.isServer) {
   // Index for Organization User.
   // Index for Organization User.
   Meteor.startup(() => {
   Meteor.startup(() => {
-    OrgUser._collection._ensureIndex({ org_id: -1 });
-    OrgUser._collection._ensureIndex({ org_id: -1, user_id: -1 });
+    OrgUser._collection._ensureIndex({ orgId: -1 });
+    OrgUser._collection._ensureIndex({ orgId: -1, userId: -1 });
   });
   });
 }
 }