@opengis/fastify-table 1.1.94 → 1.1.96

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": "@opengis/fastify-table",
3
- "version": "1.1.94",
3
+ "version": "1.1.96",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "main": "index.js",
@@ -15,7 +15,10 @@ export default async function dataInsert({
15
15
 
16
16
  const names = columns.map((el) => el.name);
17
17
 
18
- Object.assign(data, { uid, editor_id: uid });
18
+ Object.assign(data, {
19
+ ...(table !== 'admin.users' ? { uid } : {}),
20
+ // editor_id: uid,
21
+ });
19
22
  const systemColumns = ['cdate', 'editor_date'].filter((el) => names.includes(el)).map((el) => [el, 'now()']);
20
23
 
21
24
  const filterData = Object.keys(data)
@@ -94,10 +94,10 @@ export default async function dataAPI(req) {
94
94
 
95
95
  const cardColumns = cardSqlFiltered.length ? `,${cardSqlFiltered.map((el) => el.name)}` : '';
96
96
  const q = `select ${pk ? `"${pk}" as id,` : ''}
97
- ${dbColumns.find((el) => el.name === 'geom' && pg.pgType[el.dataTypeID] === 'geometry') ? 'st_asgeojson(geom)::json as geom,' : ''}
98
97
  ${query.id || query.key ? '*' : sqlColumns || cols || '*'}
99
98
  ${metaCols}
100
- ${cardColumns}
99
+ ${cardColumns}
100
+ ${dbColumns.find((el) => el.name === 'geom' && pg.pgType[el.dataTypeID] === 'geometry') ? ',st_asgeojson(geom)::json as geom' : ''}
101
101
  from (select * from ${table} where ${sqlTable ? 'true' : (where.join(' and ') || 'true')} ${order}) t
102
102
  ${sqlTable}
103
103
  ${cardSqlTable}