Преглед изворни кода

Fix bug when trying to edit in invalid times

Matt Coles пре 9 година
родитељ
комит
473ea03d53
1 измењених фајлова са 6 додато и 4 уклоњено
  1. 6 4
      presenters/event-controller.js

+ 6 - 4
presenters/event-controller.js

@@ -101,10 +101,12 @@ module.exports = {
101 101
             if (details) {
102 102
               redis.hset("event:" + event_id, "details", details);
103 103
             }
104
-            complete({
105
-              "success": 1,
106
-              "error": 0
107
-            });
104
+            if (success) {
105
+              complete({
106
+                "success": 1,
107
+                "error": 0
108
+              });
109
+            }
108 110
           } else {
109 111
             complete({
110 112
               "success": 0,