summaryrefslogtreecommitdiffstats
path: root/client/components/sidebar/sidebarArchives.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/sidebar/sidebarArchives.js')
-rw-r--r--client/components/sidebar/sidebarArchives.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/components/sidebar/sidebarArchives.js b/client/components/sidebar/sidebarArchives.js
index f2597c3c..52d42edb 100644
--- a/client/components/sidebar/sidebarArchives.js
+++ b/client/components/sidebar/sidebarArchives.js
@@ -29,8 +29,8 @@ BlazeComponent.extendComponent({
events() {
return [{
'click .js-restore-card'() {
- const cardId = this.currentData()._id;
- Cards.update(cardId, {$set: {archived: false}});
+ const card = this.currentData();
+ card.restore();
},
'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
const cardId = this._id;
@@ -38,8 +38,8 @@ BlazeComponent.extendComponent({
Popup.close();
}),
'click .js-restore-list'() {
- const listId = this.currentData()._id;
- Lists.update(listId, {$set: {archived: false}});
+ const list = this.currentData();
+ list.restore();
},
}];
},