100 lines
3.7 KiB
JavaScript
100 lines
3.7 KiB
JavaScript
|
"use strict";
|
||
|
(() => {
|
||
|
var exports = {};
|
||
|
exports.id = 4914;
|
||
|
exports.ids = [4914];
|
||
|
exports.modules = {
|
||
|
|
||
|
/***/ 5184:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("nodemailer");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 7147:
|
||
|
/***/ ((module) => {
|
||
|
|
||
|
module.exports = require("fs");
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ 6871:
|
||
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ "default": () => (/* binding */ handler)
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _functions_backend_handleNodemailer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6926);
|
||
|
/* harmony import */ var _functions_backend_handleNodemailer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_functions_backend_handleNodemailer__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
/* harmony import */ var _functions_backend_serverError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2163);
|
||
|
/* harmony import */ var _functions_backend_serverError__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_functions_backend_serverError__WEBPACK_IMPORTED_MODULE_1__);
|
||
|
// @ts-check
|
||
|
/**
|
||
|
* ==============================================================================
|
||
|
* Imports
|
||
|
* ==============================================================================
|
||
|
*/
|
||
|
|
||
|
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
|
||
|
* API handler
|
||
|
* ==============================================================================
|
||
|
* @type {import("next").NextApiHandler}
|
||
|
*/ async function handler(req, res) {
|
||
|
/**
|
||
|
* Check method
|
||
|
*
|
||
|
* @description Check request method and return if invalid
|
||
|
*/ if (req.method !== "GET") return res.json({
|
||
|
msg: "Failed!"
|
||
|
});
|
||
|
/**
|
||
|
* Send Response
|
||
|
*
|
||
|
* @description Send a boolean response
|
||
|
*/ try {
|
||
|
/**
|
||
|
* Create new user folder and file
|
||
|
*
|
||
|
* @description Create new user folder and file
|
||
|
*/ const mail = await _functions_backend_handleNodemailer__WEBPACK_IMPORTED_MODULE_0___default()({
|
||
|
alias: "support",
|
||
|
html: "<h1>Test Mail</h1><p>Hi there DSQL. Firing up on all systems now.</p>",
|
||
|
subject: "Test Mail",
|
||
|
text: "Test Mail",
|
||
|
to: "dexomediaorg@gmail.com"
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
res.json({
|
||
|
success: true
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
} catch (/** @type {any} */ error) {
|
||
|
////////////////////////////////////////
|
||
|
_functions_backend_serverError__WEBPACK_IMPORTED_MODULE_1___default()({
|
||
|
component: "/api/addUserMedia/catch-error",
|
||
|
message: error.message
|
||
|
});
|
||
|
res.json({
|
||
|
success: false,
|
||
|
msg: "Database Files could not be written!"
|
||
|
});
|
||
|
////////////////////////////////////////
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
/***/ })
|
||
|
|
||
|
};
|
||
|
;
|
||
|
|
||
|
// 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, [2163,6926], () => (__webpack_exec__(6871)));
|
||
|
module.exports = __webpack_exports__;
|
||
|
|
||
|
})();
|