@opengis/fastify-table 1.0.36 → 1.0.37
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/Changelog.md +4 -0
- package/crud/controllers/insert.js +29 -29
- package/crud/controllers/update.js +31 -31
- package/crud/funcs/getOpt.js +10 -10
- package/crud/funcs/setOpt.js +16 -16
- package/crud/index.js +29 -29
- package/helper.js +28 -28
- package/notification/controllers/userNotifications.js +19 -19
- package/notification/funcs/addNotification.js +8 -8
- package/notification/index.js +19 -19
- package/package.json +1 -1
- package/pg/pgClients.js +20 -20
- package/policy/funcs/checkPolicy.js +74 -74
- package/policy/funcs/sqlInjection.js +33 -33
- package/policy/index.js +14 -14
- package/redis/client.js +8 -8
- package/redis/funcs/redisClients.js +2 -2
- package/redis/index.js +19 -19
- package/server/templates/form/test.dataset.form.json +411 -411
- package/server/templates/select/test.storage.data.json +2 -2
- package/server/templates/table/test.dataset.table.json +24 -24
- package/table/controllers/data.js +57 -57
- package/table/controllers/form.js +10 -10
- package/table/controllers/suggest.js +60 -60
- package/table/controllers/utils/getSelect.js +20 -20
- package/table/controllers/utils/getSelectMeta.js +66 -66
- package/table/controllers/utils/getTemplate.js +28 -28
- package/table/funcs/getFilterSQL/index.js +75 -75
- package/table/funcs/getFilterSQL/util/formatValue.js +142 -142
- package/table/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/table/funcs/getFilterSQL/util/getFilterQuery.js +73 -73
- package/table/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/table/funcs/metaFormat/getSelectVal.js +20 -20
- package/table/funcs/metaFormat/index.js +26 -26
- package/table/index.js +42 -42
- package/test/api/crud.test.js +56 -56
- package/test/api/crud.xss.test.js +71 -71
- package/test/api/notification.test.js +37 -37
- package/test/api/table.test.js +57 -57
- package/test/funcs/notification.test.js +31 -31
- package/widget/controllers/utils/historyFormat.js +76 -76
- package/widget/controllers/utils/obj2db.js +13 -13
- package/widget/controllers/widget.del.js +44 -41
- package/widget/controllers/widget.get.js +86 -77
- package/widget/controllers/widget.set.js +70 -64
- package/widget/index.js +29 -29
package/widget/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import widgetDel from './controllers/widget.del.js';
|
|
2
|
-
import widgetSet from './controllers/widget.set.js';
|
|
3
|
-
import widgetGet from './controllers/widget.get.js';
|
|
4
|
-
|
|
5
|
-
async function route(fastify, opt) {
|
|
6
|
-
const prefix = opt.prefix || '/api';
|
|
7
|
-
fastify.route({
|
|
8
|
-
method: 'DELETE',
|
|
9
|
-
url: `${prefix}/widget/:type/:objectid/:id`,
|
|
10
|
-
schema: {},
|
|
11
|
-
handler: widgetDel,
|
|
12
|
-
});
|
|
13
|
-
fastify.route({
|
|
14
|
-
method: 'POST',
|
|
15
|
-
path: `${prefix}/widget/:type/:objectid/:id?`,
|
|
16
|
-
schema: {},
|
|
17
|
-
handler: widgetSet,
|
|
18
|
-
});
|
|
19
|
-
fastify.route({
|
|
20
|
-
method: 'GET',
|
|
21
|
-
path: `${prefix}/widget/:type/:objectid`,
|
|
22
|
-
config: {
|
|
23
|
-
policy: ['public'],
|
|
24
|
-
},
|
|
25
|
-
schema: {},
|
|
26
|
-
handler: widgetGet,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
export default route;
|
|
1
|
+
import widgetDel from './controllers/widget.del.js';
|
|
2
|
+
import widgetSet from './controllers/widget.set.js';
|
|
3
|
+
import widgetGet from './controllers/widget.get.js';
|
|
4
|
+
|
|
5
|
+
async function route(fastify, opt) {
|
|
6
|
+
const prefix = opt.prefix || '/api';
|
|
7
|
+
fastify.route({
|
|
8
|
+
method: 'DELETE',
|
|
9
|
+
url: `${prefix}/widget/:type/:objectid/:id`,
|
|
10
|
+
schema: {},
|
|
11
|
+
handler: widgetDel,
|
|
12
|
+
});
|
|
13
|
+
fastify.route({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
path: `${prefix}/widget/:type/:objectid/:id?`,
|
|
16
|
+
schema: {},
|
|
17
|
+
handler: widgetSet,
|
|
18
|
+
});
|
|
19
|
+
fastify.route({
|
|
20
|
+
method: 'GET',
|
|
21
|
+
path: `${prefix}/widget/:type/:objectid`,
|
|
22
|
+
config: {
|
|
23
|
+
policy: ['public'],
|
|
24
|
+
},
|
|
25
|
+
schema: {},
|
|
26
|
+
handler: widgetGet,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export default route;
|