@opengis/fastify-table
Version:
core-plugins
23 lines (18 loc) • 614 B
JavaScript
import loggerFile from './controllers/logger.file.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,
},
};
async function plugin(app) {
app.get('/logger-file/*', { config: { policy: ['public'] }, schema: loggerSchema }, loggerFile);
}
export default plugin;