Proper template name

This commit is contained in:
Joan Sanchez 2023-03-15 08:07:14 +01:00
parent cd40705ecd
commit f052af92cd
1 changed files with 10 additions and 11 deletions

View File

@ -1,5 +1,3 @@
const {Email} = require('vn-print');
module.exports = Self => {
Self.remoteMethodCtx('clientCreditEmail', {
description: 'Sends the credit request email with an attached PDF',
@ -10,7 +8,7 @@ module.exports = Self => {
type: 'number',
required: true,
description: 'The client id',
http: {source: 'path'}
http: {source: 'path'},
},
{
arg: 'recipient',
@ -22,24 +20,25 @@ module.exports = Self => {
arg: 'replyTo',
type: 'string',
description: 'The sender email to reply to',
required: false
required: false,
},
{
arg: 'recipientId',
type: 'number',
description: 'The recipient id to send to the recipient preferred language',
required: false
}
description:
'The recipient id to send to the recipient preferred language',
required: false,
},
],
returns: {
type: ['object'],
root: true
root: true,
},
http: {
path: '/:id/credit-request-email',
verb: 'POST'
}
verb: 'POST',
},
});
Self.clientCreditEmail = async ctx => Self.sendTemplate(ctx, 'client-welcome');
Self.clientCreditEmail = ctx => Self.sendTemplate(ctx, 'credit-request');
};