"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Waveform_1 = require("../features/waveform/Waveform");
const compactd_models_1 = require("compactd-models");
const storyboard_1 = require("storyboard");
function default_1(app) {
    app.get('/api/tracks/:artist/:album/:number/:name/waveform', (req, res) => {
        const uri = compactd_models_1.trackURI(req.params);
        Waveform_1.default.getData(uri).then((data) => {
            res.status(200).send(data);
        }).catch((err) => {
            res.status(500).send({
                success: false,
                error: 'An error occurred, please see logs for more details'
            });
            storyboard_1.mainStory.error('waveform', err.message, { attach: err });
        });
    });
}
exports.default = default_1;
//# sourceMappingURL=waveform.js.map