@thzero/library_server 0.16.2 → 0.16.3

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/README.md CHANGED
@@ -12,6 +12,10 @@ An opinionated library of common functionality to bootstrap an API application u
12
12
 
13
13
  ### Requirements
14
14
 
15
+ #### NodeJs
16
+
17
+ Requires [NodeJs ](https://nodejs.org) version 18+.
18
+
15
19
  #### Mongo
16
20
 
17
21
  Mongo is the only currently supposed option as the server side data source.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thzero/library_server",
3
3
  "type": "module",
4
- "version": "0.16.2",
4
+ "version": "0.16.3",
5
5
  "version_major": 0,
6
6
  "version_minor": 16,
7
- "version_patch": 2,
8
- "version_date": "08/28/2022",
7
+ "version_patch": 3,
8
+ "version_date": "11/21/2022",
9
9
  "description": "An opinionated library of common functionality to bootstrap an API application using MongoDb and Firebase. Currently either Fastify or Koa can be used as the web server.",
10
10
  "author": "thZero",
11
11
  "license": "MIT",
@@ -53,11 +53,11 @@ class BaseUserService extends Service {
53
53
  if (this._hasFailed(validationCheckExternalUserResponse))
54
54
  return validationCheckExternalUserResponse;
55
55
 
56
+ let user = null;
56
57
  const respositoryResponse = await this._repositoryUser.fetchByExternalId(correlationId, externalUser.id, true);
57
- if (this._hasFailed(respositoryResponse))
58
- return respositoryResponse;
58
+ if (this._hasSucceeded(respositoryResponse))
59
+ user = respositoryResponse.results;
59
60
 
60
- let user = respositoryResponse.results;
61
61
  if (!user) {
62
62
  user = this._initiateUser();
63
63
  user.id = externalUser.id;