UNPKG

@opengis/bi

Version:

BI data visualization module

27 lines (23 loc) 917 B
import dashboard from './controllers/dashboard.js'; import dashboardList from './controllers/dashboard.list.js'; import dashboardImport from './controllers/dashboard.import.js'; const biSchema = { type: 'object', properties: { querystring: { widget: { type: 'string', pattern: '^([\\d\\w]+)$' }, dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' }, list: { type: 'string', pattern: '^([\\d])$' }, sql: { type: 'string', pattern: '^([\\d])$' }, }, params: { id: { type: 'string', pattern: '^([\\d\\w]+)$' }, }, }, }; const policy = ['public']; export default async function route(fastify) { fastify.get(`/bi-dashboard/:id`, { config: { policy }, schema: biSchema }, dashboard); fastify.get(`/bi-dashboard`, { config: { policy } }, dashboardList); fastify.get(`/bi-dashboard-import`, { config: { policy } }, dashboardImport); }