3676-zone_delivery-days #891
|
@ -11,12 +11,12 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
arg: 'started',
|
arg: 'started',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The date calendar start',
|
description: 'The calendar date start',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'ended',
|
arg: 'ended',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The date calendar end',
|
description: 'The calendar date end',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
|
|
@ -3,15 +3,15 @@ module.exports = Self => {
|
||||||
description: 'Get zone events filtered for date and prioritized by type',
|
description: 'Get zone events filtered for date and prioritized by type',
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
arg: 'zonesId',
|
arg: 'zoneIds',
|
||||||
alexm marked this conversation as resolved
Outdated
|
|||||||
type: ['number'],
|
type: ['number'],
|
||||||
description: 'The zones id',
|
description: 'The zone identifiers or ids',
|
||||||
alexm marked this conversation as resolved
Outdated
carlosjr
commented
The zone identifiers or ids The zone identifiers or ids
|
|||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'date',
|
arg: 'date',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The date calendar',
|
description: 'The calendar date',
|
||||||
alexm marked this conversation as resolved
Outdated
carlosjr
commented
The calendar date The calendar date
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.getZoneClosing = async(zonesId, date, options) => {
|
Self.getZoneClosing = async(zoneIds, date, options) => {
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
|
@ -52,6 +52,6 @@ module.exports = Self => {
|
||||||
ORDER BY type='day' DESC, type='range' DESC, type='indefinitely' DESC) z
|
ORDER BY type='day' DESC, type='range' DESC, type='indefinitely' DESC) z
|
||||||
GROUP BY z.id`;
|
GROUP BY z.id`;
|
||||||
|
|
||||||
return Self.rawSql(query, [date, date, date, zonesId], myOptions);
|
return Self.rawSql(query, [date, date, date, zoneIds], myOptions);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
zoneIds