update:add ci cd files ==> do not edit those file
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
const User = require('../models/User')
|
||||
const Project = require('../models/Project')
|
||||
const ProjectCategory = require('../models/ProjectCategory')
|
||||
|
||||
const minute = 1000 * 60
|
||||
const hour = minute * 60
|
||||
const day = hour * 24
|
||||
|
||||
module.exports = () => {
|
||||
// check users for activation
|
||||
// setInterval(() => {
|
||||
// User.find({confirmed: false})
|
||||
// .then(users => {
|
||||
// if (users.length) {
|
||||
// ///////////////////////
|
||||
// users.forEach((item, index) => {
|
||||
// // item time and timeout
|
||||
// const itemTime = Date.parse(item.created_at)
|
||||
// const timeout = itemTime + day
|
||||
// ////////////////////////////
|
||||
// if (Date.now() >= timeout) {
|
||||
// item.remove()
|
||||
// }
|
||||
// if (index === users.length - 1) {
|
||||
// // console.log('Unconfirmed users deleted.')
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
// }, hour)
|
||||
|
||||
|
||||
// Project.find({}, async (err, data) => {
|
||||
// if (err) console.log(err)
|
||||
//
|
||||
// let index = 0
|
||||
// for await (const item of data) {
|
||||
// console.log(index)
|
||||
// if (item.category === 'ward') {
|
||||
// // item.category = '61489de2c1646e4b68e42878'
|
||||
// await item.save()
|
||||
// }
|
||||
// index++
|
||||
// }
|
||||
//
|
||||
// })
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user