Removed console.log

This commit is contained in:
dbroqua 2019-03-12 23:11:28 +01:00
parent 8b8f20a6d1
commit 823e6f0de3
4 changed files with 13 additions and 41 deletions

View File

@ -44,25 +44,11 @@ class Aws {
const newFile = params.path + '.' + params.filename.split('.')[1]
fs.copyFile(params.path, newFile, (err, res) => {
console.log('_compress => copyFile')
if (err) {
callback(err, null)
return false
}
try {
(async () => {
// const file = await imagemin([newFile], '/tmp', {
// plugins: [
// imageminJpegtran(),
// imageminPngquant({
// quality: '65-80'
// })
// ]
// })
// console.log('Après imagemin')
this._send({
path: newFile,
// path: file[0].path,
@ -71,11 +57,6 @@ class Aws {
callback(err, res)
// fs.unlink(file[0].path, () => { })
})
})()
} catch (e) {
console.log('Error:', e)
callback(e)
}
})
}
@ -86,7 +67,6 @@ class Aws {
*/
upload(params, callback) {
fs.readFile(params.path, (err, data) => {
console.log('après upload -> readfile')
if (err) {
callback(err, null)
return false

View File

@ -19,7 +19,6 @@ class Resize {
_resize (input, output, callback) {
fs.readFile(input, (err, data) => {
console.log('après readfile')
if (err) {
callback(err, null)
return false
@ -27,9 +26,7 @@ class Resize {
resizeImg(data, this.size)
.then(buf => {
console.log('then rezise')
fs.writeFile(output, buf, (err) => {
console.log('write file')
if (err) {
callback(err, null)
return false

View File

@ -165,10 +165,7 @@ class Pictures {
fs.unlink(large.output, () => { })
console.log('avant thumb')
resize.createThumbnail(req.file.path, (err, file) => {
console.log('après createThumb')
if (err) {
callback(err, null)
return false
@ -178,7 +175,6 @@ class Pictures {
path: file.output,
filename: `picture_${req.params.vegetablesId}_${key}_thumb.${req.file.originalname.split('.')[req.file.originalname.split('.').length - 1]}`
}, (err, res) => {
console.log('après upload')
if (err) { callback(err, null) }
this._createOne(req, callback)

View File

@ -85,7 +85,6 @@ class VegetableProperties {
callback(null, null)
})
.catch(e => {
console.log('this case?')
callback(e, null)
})
})