Table queries: remove befor/after from no interval endpoints
This commit is contained in:
parent
241ebb63ff
commit
4aab25b8ba
|
@ -342,11 +342,13 @@ export function getReportTableQuery( options ) {
|
|||
const filterQuery = getFilterQuery( options );
|
||||
const datesFromQuery = getCurrentDates( query );
|
||||
|
||||
const noIntervals = includes( noIntervalEndpoints, options.endpoint );
|
||||
|
||||
return {
|
||||
orderby: query.orderby || 'date',
|
||||
order: query.order || 'desc',
|
||||
after: appendTimestamp( datesFromQuery.primary.after, 'start' ),
|
||||
before: appendTimestamp( datesFromQuery.primary.before, 'end' ),
|
||||
after: noIntervals ? undefined : appendTimestamp( datesFromQuery.primary.after, 'start' ),
|
||||
before: noIntervals ? undefined : appendTimestamp( datesFromQuery.primary.before, 'end' ),
|
||||
page: query.page || 1,
|
||||
per_page: query.per_page || QUERY_DEFAULTS.pageSize,
|
||||
...filterQuery,
|
||||
|
|
Loading…
Reference in New Issue