sqlQuery Conversion : minor cleanup

add-archived-and-accountType-columns
Moe 2020-07-11 00:39:11 -07:00
parent 70c125db56
commit 556ea34ba8
2 changed files with 7 additions and 7 deletions

View File

@ -7,7 +7,7 @@ module.exports = function(s,config,lang,app,io){
action: "select", action: "select",
columns: "*", columns: "*",
table: "Schedules" table: "Schedules"
},function(err,rows) { },(err,rows) => {
rows.forEach(function(schedule){ rows.forEach(function(schedule){
s.updateSchedule(schedule) s.updateSchedule(schedule)
}) })

View File

@ -224,7 +224,7 @@ module.exports = function(s,config,lang){
columns: "*", columns: "*",
table: "Videos", table: "Videos",
where: whereQuery where: whereQuery
},function(err,r) { },(err,r) => {
if(r && r[0]){ if(r && r[0]){
r = r[0] r = r[0]
fs.chmod(e.dir+filename,0o777,function(err){ fs.chmod(e.dir+filename,0o777,function(err){
@ -249,7 +249,7 @@ module.exports = function(s,config,lang){
action: "delete", action: "delete",
table: "Videos", table: "Videos",
where: whereQuery where: whereQuery
},function(err) { },(err) => {
if(err){ if(err){
s.systemLog(lang['File Delete Error'] + ' : '+e.ke+' : '+' : '+e.id,err) s.systemLog(lang['File Delete Error'] + ' : '+e.ke+' : '+' : '+e.id,err)
} }
@ -375,14 +375,14 @@ module.exports = function(s,config,lang){
columns: "*", columns: "*",
table: "Cloud Videos", table: "Cloud Videos",
where: whereQuery where: whereQuery
},function(err,r) { },(err,r) => {
if(r&&r[0]){ if(r&&r[0]){
r = r[0] r = r[0]
s.knexQuery({ s.knexQuery({
action: "delete", action: "delete",
table: "Cloud Videos", table: "Cloud Videos",
where: whereQuery where: whereQuery
},function(err,r) { },(err,r) => {
s.deleteVideoFromCloudExtensionsRunner(e,r) s.deleteVideoFromCloudExtensionsRunner(e,r)
}) })
}else{ }else{
@ -424,13 +424,13 @@ module.exports = function(s,config,lang){
['time','=',s.nameToTime(filename)], ['time','=',s.nameToTime(filename)],
], ],
limit: 1 limit: 1
},function(err,rows) { },(err,rows) => {
if(!err && (!rows || !rows[0])){ if(!err && (!rows || !rows[0])){
++orphanedFilesCount ++orphanedFilesCount
var video = rows[0] var video = rows[0]
s.insertCompletedVideo(monitor,{ s.insertCompletedVideo(monitor,{
file : filename file : filename
},function(){ },() => {
fileComplete() fileComplete()
}) })
}else{ }else{