@thzero/library_server_fastify 0.18.4 → 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/boot/index.js CHANGED
@@ -301,8 +301,6 @@ class FastifyBootMain extends BootMain {
301
301
  for (const pluginRoute of plugins)
302
302
  await pluginRoute.initRoutes(this._routes);
303
303
 
304
- this._initRoute(new apiRoute());
305
-
306
304
  await this._initRoutes();
307
305
 
308
306
  for (const route of this._routes) {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thzero/library_server_fastify",
3
3
  "type": "module",
4
- "version": "0.18.4",
4
+ "version": "0.18.6",
5
5
  "version_major": 0,
6
6
  "version_minor": 18,
7
- "version_patch": 4,
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 a Fastify based API application.",
10
10
  "author": "thZero",
11
11
  "license": "MIT",
@@ -16,6 +16,15 @@ class UsageMetricsRoute extends BaseRoute {
16
16
  _initializeRoutes(router) {
17
17
  super._initializeRoutes(router);
18
18
 
19
+ router.post(this._join('/usageMetrics/listing'),
20
+ // eslint-disable-next-line
21
+ async (request, reply) => {
22
+ const response = (await router[LibraryServerConstants.InjectorKeys.SERVICE_USAGE_METRIC].listing(request.correlationId, request.user, request.body)).check(request);
23
+ // https://github.com/fastify/fastify-compress/issues/215#issuecomment-1210598312
24
+ return this._jsonResponse(reply, response);
25
+ }
26
+ );
27
+
19
28
  router.post(this._join('/usageMetrics/tag'),
20
29
  // eslint-disable-next-line
21
30
  async (request, reply) => {