Skip to content

Commit

Permalink
more diff cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarlandian committed Nov 30, 2020
1 parent be92993 commit 2d2b330
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spotlight-api/core/metricsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function fetchMetrics(tenantId, metricType, file, isDemo, callback) {
* @param {string[]} metrics - list of desired metrics by name
* @param {boolean} isDemo - in demo mode we fetch the files from a static directory, /core/demo_data/.
* Otherwise, fetch from Google Cloud Storage.
* @param {(error: Error | null, results: {[key: string]: DeserializedFile} | undefined) => void} callback -
* @param {(error: Error | null, results: {[key: string]: DeserializedFile} | void) => void} callback -
* the keys of `results` will map to the strings in `metrics`.
* @return {Promise<void>} will not resolve until `callback` is called.
*/
Expand Down Expand Up @@ -341,9 +341,9 @@ async function fetchMetricsByName(tenantId, metricNames, isDemo, callback) {
metricNames.forEach((metricName, index) => {
results[metricName] = deserializedFiles[index];
});
callback(null, results);
return callback(null, results);
} catch (e) {
callback(e);
return callback(e);
}
}

Expand Down

0 comments on commit 2d2b330

Please sign in to comment.