Commit 283826f5 authored by Curtis Adam's avatar Curtis Adam

Fix leitner and wozniak errors when deleting cards

parent 3dfe2515
......@@ -329,10 +329,10 @@ Meteor.methods({
Leitner.remove({
card_id: card_id
}, {multi: true});
});
Wozniak.remove({
card_id: card_id
}, {multi: true});
});
return result;
} else {
throw new Meteor.Error("not-authorized");
......
......@@ -352,16 +352,16 @@ Meteor.methods({
Meteor.call('updateShuffledCardsetQuantity', id);
Leitner.remove({
cardset_id: id
}, {multi: true});
});
Wozniak.remove({
cardset_id: id
}, {multi: true});
});
Notifications.remove({
link_id: id
}, {multi: true});
});
Ratings.remove({
cardset_id: id
}, {multi: true});
});
} else {
throw new Meteor.Error("not-authorized");
}
......@@ -390,10 +390,10 @@ Meteor.methods({
Meteor.call('updateShuffledCardsetQuantity', cardset._id);
Leitner.remove({
cardset_id: id
}, {multi: true});
});
Wozniak.remove({
cardset_id: id
}, {multi: true});
});
} else {
throw new Meteor.Error("not-authorized");
}
......
......@@ -266,6 +266,7 @@ Template.deleteCardForm.events({
if (result) {
BertAlertVisuals.displayBertAlert(TAPi18n.__('deletecardSuccess'), "success", 'growl-top-left');
$('#deleteCardModal').modal('hide');
$('.modal-backdrop').css('display', 'none');
Session.set('activeCard', undefined);
$('#deleteCardModal').on('hidden.bs.modal', function () {
$('.deleteCard').removeClass("pressed");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment