Skip to content

Commit 4bd60c6

Browse files
author
GuustMetz
committed
fix documentation
1 parent 56d8626 commit 4bd60c6

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

lib/usecases/log/GetAllLogsUseCase.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const { ApiConfig } = require('../../config/index.js');
2929
const { Op } = require('sequelize');
3030
const { dataSource } = require('../../database/DataSource.js');
3131
const { checkForFilterExclusion } = require('../common/checkForFilterExclusion.js');
32+
const { setTimeRangeQuery } = require('../../utilities/setTimeRangeQuery.js');
3233

3334
/**
3435
* Apply the given filter on the given query builder

lib/usecases/run/GetAllRunsUseCase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ class GetAllRunsUseCase {
154154
if (o2start) {
155155
setTimeRangeQuery(o2start, 'timeO2Start', filteringQueryBuilder);
156156
}
157-
157+
158158
if (o2end) {
159159
setTimeRangeQuery(o2end, 'timeO2End', filteringQueryBuilder);
160160
}
161-
161+
162162
if (updatedAt) {
163163
setTimeRangeQuery(updatedAt, 'updatedAt', filteringQueryBuilder);
164164
}

lib/utilities/setTimeRangeQuery.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,16 @@
1111
* or submit itself to any jurisdiction.
1212
*/
1313

14-
import { QueryBuilder } from "../database/utilities/QueryBuilder";
15-
1614
/**
17-
* function that sets a time range in a QueryBuilder.
18-
*
15+
* Function that sets a time range in a QueryBuilder.
16+
*
1917
* @param {object} timerange an object that defines a time range to add to the query
2018
* @param {number} timerange.from the lower bound of the time range
2119
* @param {number} timerange.to the upper bound of the time range
2220
* @param {string} attribute the model attribute for which the range will be set
23-
* @param {QueryBuilder} attribute queryBuider instance in which the time range will be set.
21+
* @param {QueryBuilder} queryBuilder queryBuider instance in which the time range will be set.
2422
* @returns {void}
2523
*/
2624
export function setTimeRangeQuery({ from = 0, to = Date.now() }, attribute, queryBuilder) {
2725
queryBuilder.where(attribute).between(from, to);
28-
}
26+
}

0 commit comments

Comments
 (0)