2017-06-13 06:44:40 +00:00
|
|
|
module.exports = function(Ticket) {
|
|
|
|
Ticket.remoteMethod('list', {
|
|
|
|
description: 'List tickets for production',
|
|
|
|
returns: {
|
2018-01-29 11:37:54 +00:00
|
|
|
arg: 'tickets',
|
2017-06-13 06:44:40 +00:00
|
|
|
type: 'object'
|
|
|
|
},
|
|
|
|
http: {
|
|
|
|
verb: 'get',
|
|
|
|
path: '/list'
|
|
|
|
}
|
|
|
|
});
|
2018-01-29 11:37:54 +00:00
|
|
|
|
2017-06-13 06:44:40 +00:00
|
|
|
Ticket.list = function(cb) {
|
|
|
|
var params = [1, 0];
|
2017-10-31 08:26:11 +00:00
|
|
|
var query = 'CALL production_control_source(?, ?)';
|
2017-06-13 06:44:40 +00:00
|
|
|
Ticket.rawSql(query, params, cb);
|
2017-10-25 11:47:39 +00:00
|
|
|
};
|
|
|
|
};
|