Skip to content

Commit

Permalink
Removed unnecessary console outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikola-Mircic committed May 20, 2022
1 parent 69d33b3 commit d34f628
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
3 changes: 0 additions & 3 deletions client/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ socket.on('data',function(data){

writeLoadedFiles(workspaceFiles, filesListDiv);
}else{
console.log(`Unexpected file found ${fileName} [${data.file.size} b]`);
receivedFiles[fileName] = Object.assign({}, data.file);
}

Expand All @@ -235,7 +234,6 @@ function insertFile(file){
for(let i=1; i<pathSteps.length-1; ++i){
pathPassed += pathSteps[i];
if(!dir.directories[pathSteps[i]]){
console.log(`Folder "${pathSteps[i]}" doesn't exists! \n Creating in process...`);
var newDir = Object.assign({}, DirectoryStruct);
newDir.directories = {};
newDir.path = pathPassed;
Expand Down Expand Up @@ -395,7 +393,6 @@ function extractFiles(dir){
}

$("#register").on('submit', (e)=>{
console.log("Stoped...");
setTimeout(()=>{}, 1000);
e.preventDefault();
});
Expand Down
2 changes: 0 additions & 2 deletions client/assets/js/sent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ fetch(window.location.origin+'/get-user-ip').then((ip)=>{
})

$(".headerContainer").on('click', ()=>{
console.log("Clicked header!");
$("#headerContainer").toggle();
$("#userIpAddr").toggle();
});

var onUsersUpdate=()=>{
$("#users").empty();
activeUsers.forEach(({name, id}, idx)=>{
console.log(`Name: ${name}, ID: ${id}, Index: ${idx}`);
var newCard = $("<button class='user-card'></button>");
newCard.append(`<h1>Name: ${name}</h1><br>`);
newCard.append(`<p><b>ID:</b> ${id}</p><br>`);
Expand Down
5 changes: 1 addition & 4 deletions client/assets/js/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,14 @@ async function downloadFolder(folderPath, e){
}

var zip = new JSZip();
console.log("Zipping ");
console.log(dir);
var files = extractFiles(dir);
console.log(files);

for(var fileIdx in files){
let file = files[fileIdx];
let file_data = await file.data();
var blob = new Blob([file_data],
{type: file.type()});
zip.file(file.path.substring(1), file.name(), blob);
console.log(`Zipped : ${file.name()}`);
}

zip.generateAsync({type:"blob"})
Expand Down
6 changes: 1 addition & 5 deletions routing/PathRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,24 @@ const PathRouter = function(saveFile, saveLogData, rootPath){
}));

app.use(bodyParser.urlencoded({extended: true}));
app.use(morgan('dev'));

app.use(requestIp.mw());

app.use('/assets',express.static(path.join(rootPath, '/client/assets')));

app.get('/', function(req, res, next){
console.log(`Sending response to the user [${requestIp.getClientIp(req)}]...`);
res.sendFile(rootPath+'/client/index.html');
});

app.get('/received', function(req, res, next){
console.log(`Sending response to the user [${requestIp.getClientIp(req)}]...`);
res.sendFile(rootPath+'/client/received.html');
});

app.get('/history', function(req, res, next){
console.log(`Sending response to the user [${requestIp.getClientIp(req)}]...`);
res.sendFile(rootPath+'/client/history.html');
});

app.get('/sent', function(req, res, next){
console.log(`Sending response to the user [${requestIp.getClientIp(req)}]...`);
res.sendFile(rootPath+'/client/sent.html');
});

Expand Down

0 comments on commit d34f628

Please sign in to comment.