tango-app-api-client 3.0.31-dev → 3.0.32-dev

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,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-client",
3
- "version": "3.0.31-dev",
3
+ "version": "3.0.32-dev",
4
4
  "description": "client",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -24,9 +24,15 @@ export async function create( req, res ) {
24
24
  {
25
25
  $limit: 1,
26
26
  },
27
+ {
28
+ $project: {
29
+ tangoId: 1,
30
+ },
31
+ },
27
32
  ];
28
33
  const ID = await aggregateClient( countQuery );
29
- const count = ID?.tangoId || 0;
34
+ const count = ID[0]?.tangoId || 0;
35
+ logger.info( { count: count } );
30
36
  const query = { clientName: inputData.clientName };
31
37
  const leadRecord = await findOne( query );
32
38
  const tangoId = count + 1;