module.exports = Self => { Self.remoteMethodCtx('print', { description: 'Returns the cmr pdf', accessType: 'READ', accepts: [ { arg: 'id', type: 'number', required: true, description: 'The cmr id', http: {source: 'path'} } ], 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/print', verb: 'GET' }, accessScopes: ['DEFAULT', 'read:multimedia'] }); Self.print = (ctx, id) => Self.printReport(ctx, id, 'cmr'); };