@thzero/library_server 0.18.5 → 0.18.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thzero/library_server",
3
3
  "type": "module",
4
- "version": "0.18.5",
4
+ "version": "0.18.6",
5
5
  "version_major": 0,
6
6
  "version_minor": 18,
7
- "version_patch": 5,
8
- "version_date": "04/06/2024",
7
+ "version_patch": 6,
8
+ "version_date": "04/07/2024",
9
9
  "description": "An opinionated library of common functionality to bootstrap an API using either Fastify or Koa as the web server.",
10
10
  "author": "thZero",
11
11
  "license": "MIT",
@@ -49,8 +49,14 @@ class UsageMetricsService extends Service {
49
49
  this._ignore.push(url);
50
50
  }
51
51
 
52
- async listing(correlationId) {
53
- return await this._repositoryUsageMetrics.listing(correlationId);
52
+ async listing(correlationId, user, params) {
53
+ this._enforceNotNull('UsageMetricsService', 'listing', 'user', user, correlationId);
54
+
55
+ const validationResponse = this._serviceValidation.check(correlationId, this._serviceValidation.usageMetricsMeasurementTagParams, params ?? {});
56
+ if (this._hasFailed(validationResponse))
57
+ return validationResponse;
58
+
59
+ return await this._repositoryUsageMetrics.listing(correlationId, params);
54
60
  }
55
61
 
56
62
  async tag(correlationId, user, tag) {