diff --git a/typescript/translucid/Translucid.js b/typescript/translucid/Translucid.js index 6ec9710..1435d81 100644 --- a/typescript/translucid/Translucid.js +++ b/typescript/translucid/Translucid.js @@ -27,7 +27,7 @@ class Translucid { const classes = object[i].classes || []; this.bind(i, object[i].file, classes); //gotta comment this later - console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`); + // console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`) } } bind(path = "/", filepath = "", classes = []) { @@ -46,8 +46,9 @@ class Translucid { toRun[i](prev, ...expressArgs, decorated[i + 1]); }); } - decorated.push((prev) => { - res.contentType(`${__dirname}/../../${filepath}`); + decorated.push((prev, req, res) => { + console.log(`${__dirname}/../../${filepath}`); + // res.contentType(`${__dirname}/../../${filepath}`); res.send(prev); }); decorated[0](readResults); diff --git a/typescript/translucid/Translucid.ts b/typescript/translucid/Translucid.ts index 235737d..2cf173f 100644 --- a/typescript/translucid/Translucid.ts +++ b/typescript/translucid/Translucid.ts @@ -32,7 +32,7 @@ class Translucid { const classes = object[i].classes || []; this.bind(i,object[i].file,classes); //gotta comment this later - console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`) + // console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`) } } bind(path:string = "/", filepath:string = "", classes:Array = []):void{ @@ -54,8 +54,9 @@ class Translucid { toRun[i](prev, ...expressArgs, decorated[i + 1]); }); } - decorated.push((prev:any):void => { - res.contentType(`${__dirname}/../../${filepath}`); + decorated.push((prev:any,req,res):void => { + console.log(`${__dirname}/../../${filepath}`); + // res.contentType(`${__dirname}/../../${filepath}`); res.send(prev); });