Procházet zdrojové kódy

No longer have to include current username in society creation requests

Matt Coles před 9 roky
rodič
revize
9c9c8a3f41
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      presenters/society-controller.js

+ 5 - 1
presenters/society-controller.js

@@ -40,7 +40,10 @@ module.exports = {
40 40
           var username = result;
41 41
           var user_query = "user:" + username;
42 42
           var users_exist = true;
43
-          if (admins.indexOf(result) !== -1) {
43
+          if (username) {
44
+            admins.push(username);
45
+          }
46
+          if (admins.indexOf(username) !== -1) {
44 47
             admins.map(function (admin_name, idx, adm) {
45 48
               user_controller.user_exists(admin_name, function (exists) {
46 49
                 if (!exists) {
@@ -159,6 +162,7 @@ module.exports = {
159 162
       }
160 163
       for (var ii = 0; ii < society_names.length; ii++) {
161 164
         self.get_society(society_names[ii], function(response) {
165
+          response.society.image = "";
162 166
           soc_objects.push(response.society);
163 167
           if (soc_objects.length === society_names.length) {
164 168
             soc_objects.sort(function(a, b) {