Skip to content

Commit

Permalink
Fix nit (moved default parameter value into function declaration line).
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Kriguer <marc.kriguer@swirldslabs.com>
  • Loading branch information
MarcKriguerAtHedera committed Oct 18, 2022
1 parent 1820a28 commit 203e3bc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions hedera-mirror-rest/monitoring/monitor_apis/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,18 @@ const checkElementsOrder = (elements, option) => {
* @param jsonRespKey json response key to extract data from json response
* @return {Promise<>}
*/
const checkResourceFreshness = async (server, path, resource, timestamp, jsonRespKey, query = undefined) => {
const checkResourceFreshness = async (
server,
path,
resource,
timestamp,
jsonRespKey,
query = {limit: 1, order: 'desc'}
) => {
const {freshnessThreshold} = config[resource];
if (freshnessThreshold === 0) {
return {skipped: true};
}
if (query === undefined) {
query = {limit: 1, order: 'desc'};
}

const url = getUrl(server, path, query);
const resp = await getAPIResponse(url, jsonRespKey);
Expand Down

0 comments on commit 203e3bc

Please sign in to comment.