|
|
@@ -65,7 +65,7 @@ module.exports = {
|
|
65
|
65
|
cancel_event: function (event_id, auth, complete, force) {
|
|
66
|
66
|
var self = this;
|
|
67
|
67
|
self.get_event(event_id, auth, function (response) {
|
|
68
|
|
- if (response) {
|
|
|
68
|
+ if (response.event.id) {
|
|
69
|
69
|
var event = response.event;
|
|
70
|
70
|
permissions_controller.user_can_manage_soc_events(auth, event.society, function (manageable) {
|
|
71
|
71
|
if (manageable || force) {
|
|
|
@@ -112,14 +112,14 @@ module.exports = {
|
|
112
|
112
|
} else {
|
|
113
|
113
|
complete({
|
|
114
|
114
|
"success": 0,
|
|
115
|
|
- "error": 2
|
|
|
115
|
+ "error": 1
|
|
116
|
116
|
});
|
|
117
|
117
|
}
|
|
118
|
118
|
});
|
|
119
|
119
|
} else {
|
|
120
|
120
|
complete({
|
|
121
|
121
|
"success": 0,
|
|
122
|
|
- "error": 1
|
|
|
122
|
+ "error": 2
|
|
123
|
123
|
});
|
|
124
|
124
|
}
|
|
125
|
125
|
}, force);
|