From a7da0811dab7ec5077749ea8c2936c3b969d69fd Mon Sep 17 00:00:00 2001 From: Patrick Maia Date: Mon, 13 Oct 2014 21:32:28 +0000 Subject: #89 - uses PUT method on /mails resource to create/update draft --- web-ui/app/js/mail_view/data/mail_sender.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'web-ui/app') diff --git a/web-ui/app/js/mail_view/data/mail_sender.js b/web-ui/app/js/mail_view/data/mail_sender.js index 7c1bc6b2..6d572e77 100644 --- a/web-ui/app/js/mail_view/data/mail_sender.js +++ b/web-ui/app/js/mail_view/data/mail_sender.js @@ -60,10 +60,8 @@ define( }; this.saveMail = function(mail) { - var method = (mail.ident === '') ? 'POST' : 'PUT'; - return $.ajax(this.attr.mailsResource, { - type: method, + type: 'PUT', dataType: 'json', contentType: 'application/json; charset=utf-8', data: JSON.stringify(mail) -- cgit v1.2.3