MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / createPayloadHash

Function createPayloadHash

server/modules/chartRuntimeFilters.js:186–197  ·  view source on GitHub ↗
(payload = {})

Source from the content-addressed store, hash-verified

184}
185
186function 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
199function resolveChartConfiguredDateRange(chart, timezone = "") {
200 if (!chart?.startDate || !chart?.endDate) return null;

Callers 2

buildChartRuntimeContextFunction · 0.85

Calls 3

dedupeFiltersFunction · 0.85
sortVariableEntriesFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected