zet-lib 1.2.14 → 1.2.15

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.
Files changed (2) hide show
  1. package/lib/zRoute.js +2 -1
  2. package/package.json +1 -1
package/lib/zRoute.js CHANGED
@@ -3482,10 +3482,11 @@ zRoute.tabAccess = async (req, res) => {
3482
3482
  let table = req.body.table
3483
3483
  let roles = myCache.get('ROLES')
3484
3484
  let roleId = res.locals.roleId
3485
- let tabs = roles[roleId].tabs[table] || []
3485
+ let tabs = roles[roleId] && roles.tabs ? roles[roleId].tabs[table] : []
3486
3486
  res.json(tabs)
3487
3487
  } catch (e) {
3488
3488
  console.log(e)
3489
+ io.to(res.locals.token).emit('error', e + '')
3489
3490
  }
3490
3491
  }
3491
3492
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"