{"size": 969, "ext": "js", "max_stars_repo_path": "routes/index.js", "max_stars_repo_name": "NexusSwitchboard/nexus-mod-dox", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "routes/index.js", "max_issues_repo_name": "NexusSwitchboard/nexus-mod-dox", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "routes/index.js", "max_forks_repo_name": "NexusSwitchboard/nexus-mod-dox", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.6071428571, "max_line_length": 114, "alphanum_fraction": 0.5975232198}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const docDiscoveryJob_1 = require("../jobs/docDiscoveryJob");
const search_1 = require("../lib/search");
const routes = [
    {
        method: "get",
        protected: false,
        path: "/discovery/:parentPageId/clean",
        handler: (req, res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
            const pagesCleaned = yield docDiscoveryJob_1.DocDiscoveryJob.cleanChildPages(req.params.parentPageId);
            return res.json({
                success: pagesCleaned,
            }).status(200);
        })
    },
    {
        method: "get",
        protected: false,
        path: "/search",
        handler: (req, res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
            return res.json(search_1.doDefaultSearch(req.query.q));
        })
    }
];
exports.default = routes;
//# sourceMappingURL=index.js.map