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

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

module.exports = require("luxon");

/***/ }),

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

module.exports = require("mongoose");

/***/ }),

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

module.exports = require("next/config");

/***/ }),

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

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

/***/ }),

/***/ 3933:
/***/ ((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 mongo_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9306);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([mongo_db__WEBPACK_IMPORTED_MODULE_0__]);
mongo_db__WEBPACK_IMPORTED_MODULE_0__ = (__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 s = new mongo_db__WEBPACK_IMPORTED_MODULE_0__/* .Schedule */ .Pf({
        next: new Date(),
        attempt: 0
    });
    const job = await mongo_db__WEBPACK_IMPORTED_MODULE_0__/* .Job.findOneAndUpdate */ .oI.findOneAndUpdate({
        _id: {
            $eq: id
        }
    }, {
        $set: {
            schedule: s
        }
    }, {
        returnDocument: "after"
    }).exec();
    if (!job) {
        return res.status(500).json({
            error: "No job to replay"
        });
    }
    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, [306], () => (__webpack_exec__(3933)));
module.exports = __webpack_exports__;

})();