UNPKG

@opengis/fastify-table

Version:

core-plugins

21 lines (20 loc) 818 B
import loggerFile from "./controllers/logger.file.js"; import loggerMetrics from "./controllers/logger.metrics.js"; // import loggerTest from './controllers/logger.test.api.js'; const loggerSchema = { querystring: { type: "object", properties: { download: { type: "string", pattern: "^(\\d)$" }, full: { type: "string", pattern: "^(\\d)$" }, dir: { type: "string", pattern: "^(\\d)$" }, token: { type: "string" }, }, additionalProperties: false, }, }; function plugin(app, opt = {}) { app.get("/logger-file/*", { config: { policy: "L0", rateLimit: false }, schema: loggerSchema }, loggerFile); app.get("/logger-metrics", { config: { policy: "L0", rateLimit: false }, schema: {} }, loggerMetrics); } export default plugin;