module.exports = Self => { Self.remoteMethodCtx('clientWelcomeHtml', { description: 'Returns the client welcome email preview', accessType: 'READ', accepts: [ { arg: 'id', type: 'number', required: true, description: 'The client id', http: {source: 'path'} }, { arg: 'recipientId', type: 'number', description: 'The recipient id', required: false } ], returns: [ { arg: 'body', type: 'file', root: true }, { arg: 'Content-Type', type: 'String', http: {target: 'header'} }, { arg: 'Content-Disposition', type: 'String', http: {target: 'header'} } ], http: { path: '/:id/client-welcome-html', verb: 'GET' } }); Self.clientWelcomeHtml = (ctx, id) => Self.printEmail(ctx, id, 'client-welcome'); };