From 1f54a127d03922b9d7eec69b6422cd5cc9ea2e93 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 20 Aug 2016 13:08:02 +0200 Subject: [PATCH] client/posts: fix deleting posts --- client/js/models/post.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/js/models/post.js b/client/js/models/post.js index 703da1ae..c3bc92e5 100644 --- a/client/js/models/post.js +++ b/client/js/models/post.js @@ -146,7 +146,7 @@ class Post extends events.EventTarget { } delete() { - return api.delete('/post/' + this._id) + return api.delete('/post/' + this._id, {version: this._version}) .then(response => { this.dispatchEvent(new CustomEvent('delete', { detail: { @@ -206,9 +206,7 @@ class Post extends events.EventTarget { } removeFromFavorites() { - return api.delete( - '/post/' + this.id + '/favorite', - {version: this._version}) + return api.delete('/post/' + this.id + '/favorite') .then(response => { const prevScore = this._ownScore; this._updateFromResponse(response);