42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
module.exports = Self => {
|
|
Self.remoteMethodCtx('collectionLabel', {
|
|
description: 'Returns the collection label',
|
|
accessType: 'READ',
|
|
accepts: [
|
|
{
|
|
arg: 'id',
|
|
type: 'number',
|
|
required: true,
|
|
description: 'The ticket id',
|
|
http: {source: 'path'}
|
|
}, {
|
|
arg: 'labelCount',
|
|
type: 'number',
|
|
required: false,
|
|
description: 'The number of labels'
|
|
}
|
|
],
|
|
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/collection-label',
|
|
verb: 'GET'
|
|
}
|
|
});
|
|
|
|
Self.collectionLabel = (ctx, id) => Self.printReport(ctx, id, 'collection-label');
|
|
};
|