Forráskód Böngészése

fix: more bug fixes

Kristian Vos 4 éve
szülő
commit
966c04fdab
3 módosított fájl, 9 hozzáadás és 4 törlés
  1. 3 3
      backend/logic/actions/users.js
  2. 5 0
      backend/logic/io.js
  3. 1 1
      backend/logic/stations.js

+ 3 - 3
backend/logic/actions/users.js

@@ -385,7 +385,7 @@ module.exports = {
 
                 (hash, next) => {
                     utils
-                        .runJob("GENERATE_RANDOM_STRONG", { length: 12 })
+                        .runJob("GENERATE_RANDOM_STRING", { length: 12 })
                         .then((_id) => {
                             next(null, hash, _id);
                         });
@@ -432,12 +432,12 @@ module.exports = {
                         username,
                         verificationToken,
                         () => {
-                            next(newUser);
+                            next(null, newUser);
                         }
                     );
                 },
             ],
-            async (user, err) => {
+            async (err, user) => {
                 if (err && err !== true) {
                     err = await utils.runJob("GET_ERROR", { error: err });
                     console.log(

+ 5 - 0
backend/logic/io.js

@@ -278,6 +278,11 @@ class IOModule extends CoreClass {
                                                     .concat(args)
                                                     .concat([
                                                         (result) => {
+                                                            this.log(
+                                                                "INFO",
+                                                                "IO_ACTION",
+                                                                `Response to action. Action: ${namespace}.${action}. Response status: ${result.status}`
+                                                            );
                                                             // respond to the socket with our message
                                                             if (
                                                                 typeof cb ===

+ 1 - 1
backend/logic/stations.js

@@ -144,7 +144,7 @@ class StationsModule extends CoreClass {
                     (stations, next) => {
                         this.setStage(5);
                         async.each(
-                            [stations[0]],
+                            stations,
                             (station, next2) => {
                                 async.waterfall(
                                     [