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 || [];
|
const classes = object[i].classes || [];
|
||||||
this.bind(i, object[i].file, classes);
|
this.bind(i, object[i].file, classes);
|
||||||
//gotta comment this later
|
//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 = []) {
|
bind(path = "/", filepath = "", classes = []) {
|
||||||
|
@ -46,8 +46,9 @@ class Translucid {
|
||||||
toRun[i](prev, ...expressArgs, decorated[i + 1]);
|
toRun[i](prev, ...expressArgs, decorated[i + 1]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
decorated.push((prev) => {
|
decorated.push((prev, req, res) => {
|
||||||
res.contentType(`${__dirname}/../../${filepath}`);
|
console.log(`${__dirname}/../../${filepath}`);
|
||||||
|
// res.contentType(`${__dirname}/../../${filepath}`);
|
||||||
res.send(prev);
|
res.send(prev);
|
||||||
});
|
});
|
||||||
decorated[0](readResults);
|
decorated[0](readResults);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Translucid {
|
||||||
const classes = object[i].classes || [];
|
const classes = object[i].classes || [];
|
||||||
this.bind(i,object[i].file,classes);
|
this.bind(i,object[i].file,classes);
|
||||||
//gotta comment this later
|
//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{
|
bind(path:string = "/", filepath:string = "", classes:Array<string> = []):void{
|
||||||
|
@ -54,8 +54,9 @@ class Translucid {
|
||||||
toRun[i](prev, ...expressArgs, decorated[i + 1]);
|
toRun[i](prev, ...expressArgs, decorated[i + 1]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
decorated.push((prev:any):void => {
|
decorated.push((prev:any,req,res):void => {
|
||||||
res.contentType(`${__dirname}/../../${filepath}`);
|
console.log(`${__dirname}/../../${filepath}`);
|
||||||
|
// res.contentType(`${__dirname}/../../${filepath}`);
|
||||||
res.send(prev);
|
res.send(prev);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue