"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const path = require("path");
function default_1(app) {
    app.get('/api/assets/:asset', (req, res) => {
        const dir = path.join(__dirname, '../../../assets');
        const f = fs.readdirSync(dir).find((dir) => req.params.asset === dir);
        if (f) {
            return res.sendFile(path.join(dir, f), {
                maxAge: '4h'
            });
        }
    });
}
exports.default = default_1;
//# sourceMappingURL=assets.js.map