zet-lib 1.2.85 → 1.2.86

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/lib/zAppRouter.js CHANGED
@@ -1593,7 +1593,18 @@ router.post('/zhistory-data', async (req, res) => {
1593
1593
  order_by: ['id asc'],
1594
1594
  })
1595
1595
  if (results.length > 0) {
1596
- let users = myCache.get('users')
1596
+ let users = {}
1597
+ if (myCache.has('users')) {
1598
+ users = myCache.get('users')
1599
+ } else {
1600
+ users = Util.arrayToObject(
1601
+ await connection.results({
1602
+ table: 'zuser',
1603
+ }),
1604
+ 'id'
1605
+ )
1606
+ myCache.set('users', users)
1607
+ }
1597
1608
  html = await zRoute.history(req, res, relations, id, MYMODEL, users, results)
1598
1609
  }
1599
1610
  res.json(html)
package/lib/zRoute.js CHANGED
@@ -4357,7 +4357,7 @@ zRoute.history = async (req, res, relations, id, MYMODEL, users, results = []) =
4357
4357
  arrDataAttributes.push({
4358
4358
  date1: result.data_1_date,
4359
4359
  date2: result.data_2_date,
4360
- by1: result.data_1.created_by,
4360
+ by1: result.data_1.updated_by,
4361
4361
  by2: result.created_by,
4362
4362
  })
4363
4363
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.85",
3
+ "version": "1.2.86",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"