"use strict";
(() => {
var exports = {};
exports.id = 405;
exports.ids = [405];
exports.modules = {

/***/ 9460:
/***/ ((module) => {

module.exports = require("lokijs");

/***/ }),

/***/ 3906:
/***/ ((module) => {

module.exports = import("docmq");;

/***/ }),

/***/ 4086:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ handler)
/* harmony export */ });
/* harmony import */ var db_loki__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4276);
/* harmony import */ var db_mq__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7947);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([db_mq__WEBPACK_IMPORTED_MODULE_1__]);
db_mq__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];


async function handler(req, res) {
    const id = Array.isArray(req.query.id) ? req.query.id[0] : req.query.id;
    const jc = (0,db_loki__WEBPACK_IMPORTED_MODULE_0__/* .getCollection */ ._)("tds-jobs");
    const queue = await (0,db_mq__WEBPACK_IMPORTED_MODULE_1__/* .getQueue */ .w)();
    if (!id) {
        return res.status(500).json({
            error: "No ID"
        });
    }
    await queue.promote(id);
    const job = jc.findOne({
        id
    });
    res.status(200).json({
        job
    });
}

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ })

};
;

// load runtime
var __webpack_require__ = require("../../../../../webpack-api-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, [947], () => (__webpack_exec__(4086)));
module.exports = __webpack_exports__;

})();