Skip to content

Commit

Permalink
Removed old console logs and improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
obujor committed May 18, 2018
1 parent ce47fe9 commit 80a14a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 3 additions & 8 deletions documentsdb/services/Documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@
var express = require('express'),
path = require('path'),
PassThrough = require('stream').PassThrough,
passport = require('passport'),
Boom = require('boom');
passport = require('passport');

var db = require('../utils/mongodb.js'),
secondary_backend = require('../utils/backend_exist'),
var secondary_backend = require('../utils/backend_exist'),
main_backend = require('../utils/backend_fs'),
FileToHtml = require('../converters/FileToHtml'),
AknToEpub = require('../converters/AknToEpub'),
Expand Down Expand Up @@ -149,10 +147,7 @@ router.get('*', function (req, res, next) {
} else if (req.extension == 'pdf' && req.headers.accept == 'application/pdf') {
getConvertedFile(new AknToPdf(), req.fileNoExtension);
} else {
main_backend.getFile(res, req.dir, req.file, function (err) {
if (err == 404) res.status(404).end();
else if (err) next(err);
});
getFile(res, req.file);
}
});

Expand Down
2 changes: 0 additions & 2 deletions documentsdb/utils/backend_exist.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ exports.getDir = function (path, callback) {
});
saxStream.on('end', function () {
fileList.shift(); // Remove our collection name
console.log('filelist', fileList);
if (res.statusCode != 200)
callback(new Error('Eist GET DIR request has status code ' + res.statusCode));
else callback(undefined, fileList.map(decode_ls));
Expand Down Expand Up @@ -188,7 +187,6 @@ function encode_write(str) {
}

function decode_ls(str) {
console.log('str', str);
return decodeURI(
str.replace(encodedRegex, replaceEncoded)
);
Expand Down

0 comments on commit 80a14a4

Please sign in to comment.