@opengis/fastify-table 2.0.92 → 2.0.94
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/metaFormat/index.ts"],"names":[],"mappings":"AAOA,wBAA8B,UAAU,CACtC,EACE,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,GAAQ,EACR,KAAU,EACV,KAAY,EACZ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,EAAE,MAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/metaFormat/index.ts"],"names":[],"mappings":"AAOA,wBAA8B,UAAU,CACtC,EACE,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,GAAQ,EACR,KAAU,EACV,KAAY,EACZ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,EAAE,MAAmB,gBAwGtB"}
|
|
@@ -12,9 +12,13 @@ export default async function metaFormat({ rows: original, table, cls = {}, html
|
|
|
12
12
|
name: el,
|
|
13
13
|
data: loadTable?.meta?.cls[el],
|
|
14
14
|
}));
|
|
15
|
+
const actualClsObj = selectCols
|
|
16
|
+
.concat(metaCls)
|
|
17
|
+
.reduce((acc, curr) => ({ ...acc, [curr.name]: curr.data }), {});
|
|
15
18
|
const list = getTemplates(["cls", "select"]).map((el) => el[0]);
|
|
16
19
|
const columnNameAsCls = Object.keys(original?.[0] || {})
|
|
17
|
-
.filter((key) =>
|
|
20
|
+
.filter((key) => !actualClsObj[key] &&
|
|
21
|
+
(list.includes(`${table}.${key}`) || list.includes(key)))
|
|
18
22
|
.map((key) => ({
|
|
19
23
|
name: key,
|
|
20
24
|
data: list.find((clsName) => [key, `${table}.${key}`].includes(clsName)),
|
|
@@ -24,11 +24,11 @@ export default async function qrCode(req, reply) {
|
|
|
24
24
|
return reply.status(404).send({ error: "invalid user", code: 404 });
|
|
25
25
|
}
|
|
26
26
|
const { enabled, secret } = await getSecret({ pg, uid });
|
|
27
|
-
const otp = secret
|
|
27
|
+
const { otp } = secret
|
|
28
28
|
? await pg
|
|
29
|
-
.query(`select social_auth_url
|
|
30
|
-
|
|
31
|
-
?.then((el) => el.rows?.[0]
|
|
29
|
+
.query(`select social_auth_url as otp from admin.users_social_auth
|
|
30
|
+
where uid=$1 and social_auth_type=$2`, [uid, "TOTP"])
|
|
31
|
+
?.then((el) => el.rows?.[0] || {})
|
|
32
32
|
: await generate({ uid, pg });
|
|
33
33
|
const base64 = otp ? await qr.toDataURL(otp) : undefined;
|
|
34
34
|
if (enabled && !config.local && !config.debug) {
|