From 293b28117be360af7774b279559c82e7f9844471 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 10 Sep 2016 11:11:16 +0200 Subject: [PATCH] client/posts: link to duplicates in upload form --- client/js/models/post.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/js/models/post.js b/client/js/models/post.js index ded6b51..7125917 100644 --- a/client/js/models/post.js +++ b/client/js/models/post.js @@ -140,6 +140,10 @@ class Post extends events.EventTarget { } return Promise.resolve(); }, response => { + if (response.name === 'PostAlreadyUploadedError') { + return Promise.reject( + `Post already uploaded (@${response.otherPostId})`); + } return Promise.reject(response.description); }); }