@opengis/fastify-table 1.3.74 → 1.3.76
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/index.js
CHANGED
|
@@ -35,9 +35,11 @@ import execMigrations from './server/plugins/migration/exec.migrations.js';
|
|
|
35
35
|
import locales from './server/routes/table/controllers/utils/locales.js';
|
|
36
36
|
import pgClients from './server/plugins/pg/pgClients.js';
|
|
37
37
|
|
|
38
|
-
import
|
|
39
|
-
|
|
40
|
-
import
|
|
38
|
+
import dblistRoutes from './server/routes/dblist/index.mjs';
|
|
39
|
+
|
|
40
|
+
import dataRoutes from './server/routes/data/index.mjs';
|
|
41
|
+
import menuRoutes from './server/routes/menu/index.mjs';
|
|
42
|
+
import templatesRoutes from './server/routes/templates/index.mjs';
|
|
41
43
|
|
|
42
44
|
// core templates && cls
|
|
43
45
|
const filename = fileURLToPath(import.meta.url);
|
|
@@ -99,6 +101,10 @@ async function plugin(fastify, opt) {
|
|
|
99
101
|
cronPlugin(fastify, opt);
|
|
100
102
|
loggerPlugin(fastify, opt);
|
|
101
103
|
|
|
104
|
+
if (config.dblist) {
|
|
105
|
+
dblistRoutes(fastify, opt);
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
// routes / api
|
|
103
109
|
cronRoutes(fastify, opt);
|
|
104
110
|
crudRoutes(fastify, opt);
|
|
@@ -107,9 +113,9 @@ async function plugin(fastify, opt) {
|
|
|
107
113
|
tableRoutes(fastify, opt);
|
|
108
114
|
utilRoutes(fastify, opt);
|
|
109
115
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
dataRoutes(fastify, opt);
|
|
117
|
+
menuRoutes(fastify, opt);
|
|
118
|
+
templatesRoutes(fastify, opt);
|
|
113
119
|
|
|
114
120
|
fastify.get('/api/test-proxy', {}, (req) => ({ ...req.headers || {}, sessionId: req.session?.sessionId }));
|
|
115
121
|
}
|
package/package.json
CHANGED
|
@@ -4,16 +4,15 @@ import setItem from './controllers/setItem.js';
|
|
|
4
4
|
const policy = ['site'];
|
|
5
5
|
|
|
6
6
|
export default async function plugin(app, config = {}) {
|
|
7
|
-
const { prefix = '/api' } = config;
|
|
8
7
|
app.route({
|
|
9
8
|
method: 'GET',
|
|
10
|
-
url:
|
|
9
|
+
url: '/db-list',
|
|
11
10
|
config: { policy },
|
|
12
11
|
handler: readItemList,
|
|
13
12
|
});
|
|
14
13
|
app.route({
|
|
15
14
|
method: 'GET',
|
|
16
|
-
url:
|
|
15
|
+
url: '/db-list/:id',
|
|
17
16
|
config: { policy },
|
|
18
17
|
handler: setItem,
|
|
19
18
|
});
|