(payload = {})
| 184 | } |
| 185 | |
| 186 | function createPayloadHash(payload = {}) { |
| 187 | return crypto |
| 188 | .createHash("sha256") |
| 189 | .update(JSON.stringify({ |
| 190 | filters: dedupeFilters(payload.filters || []), |
| 191 | variables: sortVariableEntries(payload.variables || {}).reduce((acc, [key, value]) => { |
| 192 | acc[key] = value; |
| 193 | return acc; |
| 194 | }, {}), |
| 195 | })) |
| 196 | .digest("hex"); |
| 197 | } |
| 198 | |
| 199 | function resolveChartConfiguredDateRange(chart, timezone = "") { |
| 200 | if (!chart?.startDate || !chart?.endDate) return null; |
no test coverage detected