feat: add ci cd files dont edit those files

This commit is contained in:
mahyargdz
2024-10-21 10:22:26 +03:30
commit fb5b440d42
321 changed files with 188273 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
const ContactUs = require('../models/ContactUs');
const database = require('../database');
module.exports.createAdmins = () => {
database.once('open', async cb => {
try {
const contactUs = await ContactUs.find();
if (!contactUs.length) {
const data = {
description : "توضیحات صفحه تماس با ما",
showInMenu : true,
main : true,
email : 'test@gmail.com',
phone : '08632222222',
address : 'میدان فاطمیه',
catId : null,
_creator : null,
_updatedBy : null,
location : {
type : 'Point',
coordinates : [-118.2870407961309,33.93508571994455]
},
siteMap : true,
showInFooter : true
};
const newContactUs = new ContactUs(data);
newContactUs.save(err => {
if (err) console.log(err)
})
}
} catch
(e) {
console.log('defualt contact us creation has error -- ', e)
}
})
}