@opengis/admin 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
import path from 'node:path';
|
2
2
|
|
3
|
-
import { config, handlebars, setOpt, setToken, getTemplate, handlebarsSync } from "@opengis/fastify-table/utils.js";
|
3
|
+
import { config, handlebars, setOpt, setToken, getTemplate, handlebarsSync, applyHook } from "@opengis/fastify-table/utils.js";
|
4
4
|
//import { setOpt, setToken } from "../../../../../fastify-table/utils.js";
|
5
5
|
// import yaml from 'js-yaml';
|
6
6
|
import getTableData from "./tableData.js";
|
7
7
|
import conditions from './utils/conditions.js';
|
8
8
|
|
9
9
|
export default async function getCardData(req) {
|
10
|
+
|
10
11
|
const {
|
11
12
|
pg, params = {}, session = {}, user
|
12
13
|
} = req;
|
13
14
|
const { table, id } = params;
|
14
15
|
const uid = session.passport?.user?.uid;
|
15
16
|
|
17
|
+
const res = await applyHook('cardData', { table, id, user });
|
18
|
+
if (res) return res;
|
19
|
+
|
20
|
+
|
16
21
|
const time = Date.now();
|
17
22
|
|
18
23
|
const template = await getTemplate('card', table);
|