@opengis/fastify-table 2.5.40 → 2.5.41
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/dist/server/routes/util/controllers/config.d.ts.map +1 -1
- package/dist/server/routes/util/controllers/config.js +2 -3
- package/dist/server/routes/util/index.d.ts +1 -1
- package/dist/server/routes/util/index.d.ts.map +1 -1
- package/dist/server/routes/util/index.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../server/routes/util/controllers/config.ts"],"names":[],"mappings":"AAyBA,wBAA8B,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../server/routes/util/controllers/config.ts"],"names":[],"mappings":"AAyBA,wBAA8B,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,gBAUpD"}
|
|
@@ -25,9 +25,8 @@ function processObject(obj, substr) {
|
|
|
25
25
|
: substringObject(obj, substr);
|
|
26
26
|
}
|
|
27
27
|
export default async function apiConfig({ user }) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(config.debug && user?.user_type?.includes?.("admin"))) {
|
|
28
|
+
const debug = (config.local || config.debug) && user?.user_type?.includes?.("admin");
|
|
29
|
+
if (process.platform === "win32" || debug) {
|
|
31
30
|
return config;
|
|
32
31
|
}
|
|
33
32
|
const reductConfig = processObject(config, 3);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/util/index.ts"],"names":[],"mappings":"AAaA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/routes/util/index.ts"],"names":[],"mappings":"AAaA,iBAAS,MAAM,CAAC,GAAG,EAAE,GAAG,QA4CvB;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -7,7 +7,7 @@ import dependencies from "./controllers/dependencies.js";
|
|
|
7
7
|
import apiCheck from "./controllers/api.check.js";
|
|
8
8
|
const tags = ["core", "util"];
|
|
9
9
|
const packageName = "fastify-table";
|
|
10
|
-
function plugin(app
|
|
10
|
+
function plugin(app) {
|
|
11
11
|
app.get("/next-id", { config: { tags, package: packageName, policy: "L0" } }, nextId);
|
|
12
12
|
app.get("/check", { config: { tags, package: packageName, role: "admin" } }, apiCheck);
|
|
13
13
|
app.get("/status-monitor", { config: { tags, package: packageName, role: "admin" } }, statusMonitor);
|
|
@@ -17,7 +17,7 @@ function plugin(app, opt = {}) {
|
|
|
17
17
|
...(req.headers || {}),
|
|
18
18
|
sessionId: req.session?.sessionId,
|
|
19
19
|
}));
|
|
20
|
-
app.get("/config", { config: { tags, package: packageName,
|
|
20
|
+
app.get("/config", { config: { tags, package: packageName, role: "admin" } }, apiConfig);
|
|
21
21
|
app.get("/dependencies", { config: { tags, package: packageName, policy: "L1", role: "admin" } }, dependencies);
|
|
22
22
|
}
|
|
23
23
|
export default plugin;
|