typescript(translucid): logged
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
13fe6be102
commit
c8bd42b769
|
@ -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);
|
||||
|
|
|
@ -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<string> = []):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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue