From ad51ce067a034a76e4483e798d5cf71b3caea698 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Tue, 11 Aug 2015 21:11:56 +0000 Subject: [PATCH] Move to getsingle api and associated changes --- ang/crmMailing/MsgTemplateCtrl.js | 6 +++--- ang/crmMailing/services.js | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ang/crmMailing/MsgTemplateCtrl.js b/ang/crmMailing/MsgTemplateCtrl.js index c5147b0b62..d8873075a4 100644 --- a/ang/crmMailing/MsgTemplateCtrl.js +++ b/ang/crmMailing/MsgTemplateCtrl.js @@ -33,9 +33,9 @@ // @return Promise $scope.loadTemplate = function loadTemplate(mailing, id) { return crmMsgTemplates.get(id).then(function(tpl) { - mailing.subject = tpl.values[0].msg_subject; - mailing.body_text = tpl.values[0].msg_text; - mailing.body_html = tpl.values[0].msg_html; + mailing.subject = tpl.msg_subject; + mailing.body_text = tpl.msg_text; + mailing.body_html = tpl.msg_html; }); }; }); diff --git a/ang/crmMailing/services.js b/ang/crmMailing/services.js index b4e69c2eee..c76da9238f 100644 --- a/ang/crmMailing/services.js +++ b/ang/crmMailing/services.js @@ -64,8 +64,7 @@ // @param id MessageTemplate id (per APIv3) // @return Promise MessageTemplate (per APIv3) get: function get(id) { - return crmApi('MessageTemplate', 'get', { - "sequential": 1, + return crmApi('MessageTemplate', 'getsingle', { "return": "id,msg_subject,msg_html,msg_title,msg_text", "id": id }); -- 2.25.1