Update
This commit is contained in:
@@ -115,7 +115,7 @@ module.exports.checkSerial = [
|
|||||||
else return res404(res, errMsg)
|
else return res404(res, errMsg)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
return res500(res, `there is an error here --- ${e}`)
|
return res404(res, e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ const {
|
|||||||
generateRandomDigits
|
generateRandomDigits
|
||||||
} = require('../plugins/controllersHelperFunctions')
|
} = require('../plugins/controllersHelperFunctions')
|
||||||
const _faSr = _sr.fa
|
const _faSr = _sr.fa
|
||||||
|
|
||||||
const transporter = nodemailer.createTransport({
|
const transporter = nodemailer.createTransport({
|
||||||
host: 'smtp.c1.liara.email',
|
host: 'smtp.c1.liara.email',
|
||||||
port: 587,
|
port: 587,
|
||||||
@@ -36,6 +37,7 @@ const transporter = nodemailer.createTransport({
|
|||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
/// ///////////////////////////////////////////////////////////////// verify account functions
|
/// ///////////////////////////////////////////////////////////////// verify account functions
|
||||||
function sendConfirmationEmail(userId) {
|
function sendConfirmationEmail(userId) {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
const mongoose = require('mongoose')
|
const mongoose = require('mongoose')
|
||||||
// mongodb database connection string. change it as per your needs. here "mydb" is the name of the database. You don't need to create DB from mongodb terminal. mongoose create the database automatically.
|
// mongodb database connection string. change it as per your needs. here "mydb" is the name of the database. You don't need to create DB from mongodb terminal. mongoose create the database automatically.
|
||||||
const inHostUrl = 'mongodb://root:KPTt76tImNBBMm4Kor8QA9gB@asan-service:27017/my-app?authSource=admin'
|
const inHostUrl = 'mongodb://root:KPTt76tImNBBMm4Kor8QA9gB@asan-service:27017/asanserv_database?authSource=admin'
|
||||||
const outHostUrl = 'mongodb://root:KPTt76tImNBBMm4Kor8QA9gB@hotaka.liara.cloud:33794/asanserv_database?authSource=admin'
|
const outHostUrl = 'mongodb://root:KPTt76tImNBBMm4Kor8QA9gB@hotaka.liara.cloud:33794/asanserv_database?authSource=admin'
|
||||||
const init = ()=>{
|
const init = ()=>{
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
const mongoose = require('mongoose')
|
||||||
|
|
||||||
|
const SerialSchema = mongoose.Schema({
|
||||||
|
|
||||||
|
code:String,
|
||||||
|
model:String,
|
||||||
|
message:String
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = mongoose.model('Serial', SerialSchema)
|
||||||
Binary file not shown.
Reference in New Issue
Block a user